Expected Behavior
body-max-line-length should not report false positives for line starts with #
Current Behavior
body-max-line-length report false positives for line starts with #
While debuging in the node_modules/@commitlint/rules/lib/body-max-line-length.js
I found parsed.body have the following value as follows:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch chore/sync-remote-config2
# Your branch is up to date with 'origin/chore/sync-remote-config2'.
#
# Changes to be committed:
# modified: packages/code-standard-cli/package.json
# new file: packages/xxx/src/_private/yyyy/diffConfig.ts
# renamed: packages/xxx/src/_private/yyyy/foo/bar.ts -> packages/xxx/src/_private/yyyy/foo/barabcdefg.ts
#
Obviously, the lines come from the git commit command line, and should be ignored as they starts with #
Affected packages
Possible Solution
Steps to Reproduce (for bugs)
- First step
- Second step
commitlint.config.js
```js
```
Context
Your Environment
| Executable |
Version |
commitlint --version |
VERSION |
git --version |
VERSION |
node --version |
VERSION |
Expected Behavior
body-max-line-lengthshould not report false positives for line starts with#Current Behavior
body-max-line-lengthreport false positives for line starts with#While debuging in the
node_modules/@commitlint/rules/lib/body-max-line-length.jsI found
parsed.bodyhave the following value as follows:Obviously, the lines come from the
git commitcommand line, and should be ignored as they starts with#Affected packages
Possible Solution
Steps to Reproduce (for bugs)
commitlint.config.js
```js ```Context
Your Environment
commitlint --versiongit --versionnode --version