-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: Validate multi-line messages #68
Conversation
Thanks for working on this @grahamhar. I have a few comments on the implementation having thought about this a little more:
|
b143dcf
to
5d30aa0
Compare
@thekaveman I think I have managed to implement this in the way you are asking, let me know if you have any other suggestions. I do have one thought on how we should handle the following example (A subject followed by a blank line but no body) as I couldn't find an answer in the spec on this
Also I am unsure if the use of |
I'm OK to ignore this case -- you're right, I can't see anything in the spec on this either, and normally git will just delete those extra blank lines from the commit message in post.
Good point. I think a regex like |
The documented conventional commit specification states that on multi-line commit message there must be a blank line between the title and the body. To avoid a breaking change this has been toggled using the strict option, in the next major release this toggle will be removed.
@thekaveman I think this should be good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this and going back and forth with me on some reviews @grahamhar!
Thanks again @grahamhar! I have released |
The documented conventional commit specification states that on multi-line commit message there must be a blank line between the title and the body.
I was unsure on updating the error output or not. If it is updated I guess the error out put should guide towards which element failed the title line or the multi line issue. Let me know your thoughts.
fixes #67