conventional-changelog/commitlint

Commitlint considering `Signed-off-by` as body

Open

#3411 aperta il 24 ott 2022

Vedi su GitHub
 (10 commenti) (2 reazioni) (0 assegnatari)TypeScript (896 fork)batch import
bughelp wanted

Metriche repository

Star
 (15.497 star)
Metriche merge PR
 (Merge medio 5g 19h) (65 PR mergiate in 30 g)

Descrizione

I create my commit with the following git commit -s -m "This is a commit message"

Which produces the following commit:

This is a commit message

Signed-off-by:  me@example.com

And a configuration with the following:

module.exports = {
    rules: {
       'body-leading-blank': [2, 'always'],
       'body-empty': [2, 'never'],
    },
};

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 that Signed-off-by is the commit body.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

N/A

Steps to Reproduce (for bugs)

  1. git commit -s -m "This is a commit message"
  2. create config with the above content
  3. commitlint --config -e --verbose

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

Executable Version
commitlint --version @commitlint/cli@17.1.2
git --version git version 2.32.0 (Apple Git-132)
node --version v14.17.5

Guida contributor