Expected Behavior
{body,footer}-max-line-length should only validate the body of the message and the footer of the message
Current Behavior
if the git commit is done with the verbose option (that will show the diff), the rules {body,footer}-max-line-length will run even on the diff
Affected packages
Possible Solution
maybe commitlint should have a pre processing step and remove content before the diff
Maybe split by:
const newValue = value.split("diff --git a/")[0];
Steps to Reproduce (for bugs)
- With the code from https://github.com/marionebl/commitlint/pull/436
- Make a change that causes a line to be bigger than 100
git add that change
git commit to open the default editor with the diff (if doesn't show the diff do git commit --verbose
- write a valid commit message
- will fail
Context
Found out when trying to commit this changes: https://github.com/marionebl/commitlint/pull/436
When doing a commit message with: git commit -m "<message>" it was working
But when I was commit like: git commit typing the message in editor and save, it was failling
Your Environment
editor: neovim
| Executable |
Version |
commitlint --version |
latest |
git --version |
2.18.0 |
node --version |
v8.11.3 |
Expected Behavior
{body,footer}-max-line-length should only validate the body of the message and the footer of the message
Current Behavior
if the git commit is done with the verbose option (that will show the diff), the rules {body,footer}-max-line-length will run even on the diff
Affected packages
Possible Solution
maybe commitlint should have a pre processing step and remove content before the diff
Maybe split by:
Steps to Reproduce (for bugs)
git addthat changegit committo open the default editor with the diff (if doesn't show the diff dogit commit --verboseContext
Found out when trying to commit this changes: https://github.com/marionebl/commitlint/pull/436
When doing a commit message with:
git commit -m "<message>"it was workingBut when I was commit like:
git committyping the message in editor and save, it was faillingYour Environment
editor: neovim
commitlint --versiongit --versionnode --version