conventional-changelog/commitlint

Commitlint considering `Signed-off-by` as body

Open

#3 411 ouverte le 24 oct. 2022

Voir sur GitHub
 (10 commentaires) (2 réactions) (0 assignés)TypeScript (896 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (15 497 stars)
Métriques de merge PR
 (Merge moyen 12h 56m) (52 PRs mergées en 30 j)

Description

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

Guide contributeur