Skip to content

Empty commit message throws error #615

Closed
@eddiemonge

Description

@eddiemonge

Providing an empty commit message (normally used to abort committing in git), throws an error message. Length is being used without checking that it is avaible

Version 7.5.2

TypeError: Cannot read property 'length' of null
    at exports.default (./node_modules/@commitlint/rules/lib/header-max-length.js:10:143)
    at results.filter.map.entry (./node_modules/@commitlint/lint/lib/index.js:138:17)
    at Array.map (<anonymous>)
    at Object.<anonymous> (./node_modules/@commitlint/lint/lib/index.js:118:7)
    at process._tickCallback (internal/process/next_tick.js:68:7)
husky > commit-msg hook failed (add --no-verify to bypass)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions