Parser header pattern
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 typeI 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.
Source: conventional-changelog/conventional-changelog