footer-leading-blank complains when comment in body
Example Commit Message
fix: failing example
body line 1
# comment in body breaks footer-leading-blank - uncomment to remove the error
body line 2
fixes #123
Try it out
This bug seems to differ from #896
Expected Behavior
The rule should locate the body lines properly and not think there is content between body and footer.
Current Behavior
The footer-leading-blank rule counts the body lines excluding the comments and then compares them to the raw input, which in turn contains the comments.
Affected packages
Possible Solutions
Bug is in footer-leading-blank.ts
- Correctly count the raw length of
bodyLines in or
- Remove comment lines from
rawLines before slicing
Steps to Reproduce (for bugs)
See message or link at the top of the issue
Your Environment
| Executable |
Version |
commitlint --version |
16.2.3 |
git --version |
2.35.1 |
node --version |
16.14.2 |
footer-leading-blank complains when comment in body
Example Commit Message
fix: failing example body line 1 # comment in body breaks footer-leading-blank - uncomment to remove the error body line 2 fixes #123Try it out
This bug seems to differ from #896
Expected Behavior
The rule should locate the body lines properly and not think there is content between body and footer.
Current Behavior
The
footer-leading-blankrule counts the body lines excluding the comments and then compares them to the raw input, which in turn contains the comments.Affected packages
@commitlint/rulesand all packages using itPossible Solutions
Bug is in
footer-leading-blank.tsbodyLinesin orrawLinesbefore slicingSteps to Reproduce (for bugs)
See message or link at the top of the issue
Your Environment
commitlint --version16.2.3git --version2.35.1node --version16.14.2