conventional-changelog/commitlint

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

Open

#3,129 建立於 2022年4月20日

在 GitHub 查看
 (9 留言) (1 反應) (0 負責人)TypeScript (15,497 star) (896 fork)batch import
bughelp wanted

描述

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

貢獻者指南