conventional-changelog/commitlint

input is not displayed correctly (non-existing blank lines added)

Open

#3129 aperta il 20 apr 2022

Vedi su GitHub
 (9 commenti) (1 reazione) (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

Current Behavior

When there's no blank line between body and footer (and the line is recognised as footer due to existing issue reference), commitlint wrongly displays the input and adds that blank line between them, which makes the lint messages pretty confusing (please look at the example below).

Expected Behavior

Displayed input should be exactly the same as provided input.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

Display the initial input with no modification at all.

Steps to Reproduce (for bugs)

❯ echo "test(general): test

some body
related to #1

Issues: #2" | npx commitlint
⧗   input: test(general): test

some body

related to #1

Issues: #2
✖   footer must have leading blank line [footer-leading-blank]

(looking at what is displayed - the blank line is there, but it's actually missing)

Context

Your Environment

Executable Version
commitlint --version @commitlint/cli@16.2.3
git --version git version 2.32.0 (Apple Git-132)
node --version v17.9.0

Guida contributor