-
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
Print commit message after error message if it is invalid #222
Comments
I think this is a good idea, any chance you could help out with this? |
@marionebl Sure. I'll try to open a PR with this enhancement in the next days. |
@dnamorim Are you still interested in this? |
@marionebl Yes. I'm sorry but I didn't have the time to fully finish this. I'll try to open a PR this weekend. |
No worries, just asking to know if I should take this up. Any help is greatly appreciated. 👍 |
When using the CLI, if the message is invalid we lose all its content (using a custom message in VIM mode), which might be a little frustrating when we a have a long commit body. This feature prints the full message when there are linting errors. Closes conventional-changelog#222
When using the CLI, if the message is invalid we lose all its content (using a custom message in VIM mode), which might be a little frustrating when we a have a long commit body. This feature prints the full message when there are linting errors. Closes conventional-changelog#222
When using the CLI, if the message is invalid we lose all its content (using a custom message in VIM mode), which might be a little frustrating when we a have a long commit body. This feature prints the full message when there are linting errors. Closes conventional-changelog#222
When using the CLI, if the message is invalid we lose all its content (using a custom message in VIM mode), which might be a little frustrating when we a have a long commit body. This feature prints the full message when there are linting errors. Closes #222
Another option would be to run |
Currently, when using the CLI, if the message is invalid we lose all its content (using a custom message in VIM mode), which might be a little frustrating when we a have a long commit body, so it would be nice if we show the previous message after the linting errors.
Expected Behavior
If the message fails it could be printed to after the error message like:
Current Behavior
Currently, it only shows the following output:
⧗ input: foo ✖ type may not be empty [type-empty] ✖ found 1 problems, 0 warnings
Affected packages
Possible Solution
This can be done in the @commitlint/cli/src/cli.js module by not splitting the message by
\n
in case of error so we have access to the whole message to further edit.Steps to Reproduce (for bugs)
foo Lorem ipsum dolor sit amet consectetur adipisicing elit. Nostrum iure distinctio atque dolorum ratione? Ullam, impedit nemo. Porro, quasi. Tempore rem facere ut enim dolores consequuntur illo maiores consequatur provident.
commitlint.config.js
Context
In our workflow, the commit messages are as much detailed as possible since their contents are used to create the PR description. If the message is very long it is quite frustrating if something is invalid and we lose all the previous work.
Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: