-
Notifications
You must be signed in to change notification settings - Fork 935
Commitlint considering Signed-off-by
as body
#3411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The root cause seems to be: conventional-changelog/conventional-changelog#773 |
Having this same issue in the Rook project. From the spec commitlint claims to follow, it seems clear to me that |
I believe footer detection logic is broken. According to Conventional Commits, everything that parses like a trailer should be part of the footer. In this case, it would include Signed-Off-By:. https://www.conventionalcommits.org/en/v1.0.0/
Right now, Is a fix welcome? |
@felipecrs sure, go ahead ❤ |
It's not that simple.
I propose we keep What do you think? |
Also, whatever change would need to be done in https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser. |
Sounds good
We haven't even updated that to the latest version #4069 |
Oh yeah, that would need to be done first. :P |
I create my commit with the following
git commit -s -m "This is a commit message"
Which produces the following commit:
And a configuration with the following:
My expectation is that when I run
commitlint
I would see an error telling me that there is an empty commit body.Current Behavior
What I'm currently seeing is that
commitlint
appears to think thatSigned-off-by
is the commit body.Affected packages
Possible Solution
N/A
Steps to Reproduce (for bugs)
commitlint.config.js
```js module.exports = { rules: { 'body-leading-blank': [2, 'always'], 'body-empty': [2, 'never'], }, }; ```Context
I would like to be able to have commitlint fail on an empty message body. However, I would like to account for the fact that some folks sign their commits and others do not (not currently a requirement).
Your Environment
commitlint --version
@commitlint/[email protected]
git --version
git version 2.32.0 (Apple Git-132)
node --version
v14.17.5
The text was updated successfully, but these errors were encountered: