Skip to content

fix: Body line with reference like #123 is considered footerΒ #4099

@Wuestengecko

Description

@Wuestengecko

Steps to Reproduce

echo 'rules: {footer-leading-blank: [2, always]}' > .commitlintrc.yml
cat > commit-message.txt << EOF
fix: don't frobnicate the foobar

This commit prevents the foobar from being frobnicated
during 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

commitlint --version

@commitlint/[email protected]

git --version

v2.45.2

node --version

v22.4.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions