Skip to content
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

Parser header pattern #827

Open
AdeAttwood opened this issue Jul 28, 2021 · 0 comments
Open

Parser header pattern #827

AdeAttwood opened this issue Jul 28, 2021 · 0 comments

Comments

@AdeAttwood
Copy link
Member

We are starting to get a few issues on the @conventional-changelog/commitlint repo that trace back to the header pattern failing in the parser. This then leaves the type empty, and commitlint then sends the users confusing error messages. We have already overridden the angular parser to allow a ! so we can catch that and give the user better feedback.

Examples of some failing commits are:

dashed-type: subject
集成: chinese in type

I have seen the issue on conventionalcommits.org accepted characters for type and scope and suggest a change to the header pattern in the conventional-changelog-angular and conventional-changelog-conventionalcommits parser options. I think if we allow anything that is not :, ( or ) to give the parser more flexibility.

- /^(\w*)(?:\((.*)\))?!?: (.*)$/
+ /^([^\(\):]*)(?:\((.*)\))?!?: (.*)$/

Let me know your thoughts, I am happy to put together a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant