-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input is not displayed correctly (non-existing blank lines added) #3129
Comments
Could you link the issue? Thanks! Would you have time and motivation to look into this? |
@escapedcat If you can point which module is responsible for generating the output I will try to find the issue in logic, so even if I don't do the changes myself (I would need to find some time to get familiar with your contributing rules etc.), I would report the suggested change(s) so you can just process it further. |
@escapedcat okay, that was actually quite quick: commitlint/@commitlint/lint/src/lint.ts Lines 191 to 196 in c63802d
commitlint/@commitlint/lint/src/commit-message.ts Lines 7 to 18 in c63802d
What's the problem? Instead of returning |
Would need to check, but most important cases are covered by tests™️ . For a start you could just give it a try and see if any tests fail. |
@escapedcat quick JavaScript lesson, but have it 😉
so simply there's a missing test for the above case. |
@escapedcat I did a quick test and replaced
So what's the issue - we use
vs what we display:
And unfortunately We have then 2 solutions:
|
#3120 is about some issue with #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 |
@jaklan Yes, #896 is purely about the implementation in |
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
Possible Solution
Display the initial input with no modification at all.
Steps to Reproduce (for bugs)
(looking at what is displayed - the blank line is there, but it's actually missing)
Context
Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: