You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo'rules: {footer-leading-blank: [2, always]}'> .commitlintrc.yml
cat > commit-message.txt <<EOFfix: don't frobnicate the foobarThis commit prevents the foobar from being frobnicatedduring operation, and therefore fixes #69.EOF
npx '@commitlint/[email protected]' -e commit-message.txt
Current Behavior
Validation fails with:
⧗ input: fix: don't frobnicate the foobar
This commit prevents the foobar from being frobnicated
during operation, and therefore fixes #69.
✖ footer must have leading blank line [footer-leading-blank]
✖ found 1 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
Expected Behavior
Validation passes.
Affected packages
cli
core
prompt
config-angular
Possible Solution
No response
Context
Also happens with the full reference format: user/repo#123
It might be related, now that I've read the spec more carefully. Without having looked at any code, I think the problematic point is number 10:
A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
Maybe commitlint also looks for token/separator pairs somewhere in the middle of the line, instead of only at the beginning? The spec isn't really clear on whether that's allowed, and I guess it also depends on how commitlint wants to parse things like
which is interpreted by Github. I can see how trying to parse this as three separate footers could easily lead to this kind of confusion in the body.
(Although now I'm not sure if #3695 is actually a bug. The way I read it, "JIRA-1234" is a valid "token", but without a separator and value afterwards, it's not a footer.)
Steps to Reproduce
Current Behavior
Validation fails with:
Expected Behavior
Validation passes.
Affected packages
Possible Solution
No response
Context
Also happens with the full reference format:
user/repo#123
commitlint --version
@commitlint/[email protected]
git --version
v2.45.2
node --version
v22.4.0
The text was updated successfully, but these errors were encountered: