question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty commit message throws error

See original GitHub issue

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)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
timdavishcommented, May 11, 2019

I can also reproduce this by running git commit and then aborting & exiting vim with just :q! (without writing anything).

6reactions
mauricekleinecommented, Apr 15, 2019

@escapedcat I can reproduce this by running git commit and exiting vim (:wq) right away, without writing anything.

Read more comments on GitHub >

github_iconTop Results From Across the Web

husky - Strange error when attempting to commit. [subject-empty]
What it means is that you've added a non-Git program (specifically, something called "husky") and told Git to use Husky to check your...
Read more >
Git - git-commit Documentation
This file contains the commit message of a commit in progress. If git commit exits due to an error before creating a commit,...
Read more >
git commit --allow-empty (Example) - Coderwall
Sometimes I need to make empty commits on throw away branches so that I can trigger various kinds of things for a variety...
Read more >
Commit messages - Koha Wiki
5) Repeat step 2. 6) Observe the error is gone. 7) Sign off. A detailed test plan, with a clear heading. It should...
Read more >
Can't commit files because of empty commit message
Succesfull commit. What happens instead? IDE shows me an error of empty commit message. PhpStorm 2021.1 git. Screenshot 2021-04-13 at 10.03.36 1.png
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found