input is not displayed correctly (non-existing blank lines added)
See original GitHub issueCurrent 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 |
Issue Analytics
- State:
- Created a year ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Removing blank lines from a textarea's output - php
I'm using PHP. I dont mind using a regexp or anything else. Incorrect Data Matthew Mark Luke John James. Correct Data (Note blank...
Read more >outreg2 - RePEc
A blank line can be inserted by including "" as a note. ... specifies user-added text (including numbers) to be displayed in new...
Read more >Fix list for IBM Integration Bus Version 10.0
TOOLKIT INCORRECTLY DISPLAYS EXECUTIONS GROUPS AS UP/DOWN WHEN THEY ARE RESTRICTED. IT22890, USER NODE DEFINED SIMULATOR DOES NOT DISPLAY THE LARGE ICON.
Read more >How to use grep command in Linux/ Unix with examples
Display 4 lines after dropped word matched in firewall log file # ... If there is process named tiger (output of grep is...
Read more >Add a field to a form or report - Microsoft Support
If the Field List pane is not displayed, do one of the following: On the Design tab, in the Tools group, click Add...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jaklan Yes, #896 is purely about the implementation in
footer-leading-blank.ts
, although a better parsing might help with that issue as well.@escapedcat
#3120 is about some issue with
footer-leading-blank
rule logic used to calculate if there’s blank line before footer or not, so imho it’s completely not related.#896 is about parsing - when we provide:
we get:
and for:
we get:
So in general - that’s a problem with parser not being able to properly identify what is body, and what is footer. So also not related to the above one, but to
conventional-commits-parser
, and affects not the input display, but the execution of defined rules.