You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes it is convenient to specify multiple scopes in a commit message e.g. feat(pkg1,pkg2): add some feature.
Current behaviour with v3.0.0
The following command is raising an error:
git commit -m "feat(pkg1,pkg2): add new feature"
Error
[Bad Commit message] >> feat(pkg1,pkg2): add new feature
Your commit message does not follow Conventional Commits formatting
https://www.conventionalcommits.org/
Conventional Commits start with one of the below types, followed by a colon,
followed by the commit subject and an optional body seperated by a blank line:
ci build docs feat fix perf refactor style test EXP
Example commit message adding a feature:
feat: implement new API
Example commit message fixing an issue:
fix: remove infinite loop
Example commit with scope in parentheses after the type for more context:
fix(account): remove infinite loop
Example commit with a body:
fix: remove infinite loop
Additional information on the issue caused by the infinite loop
Expected behaviour
If the scopes are comma separated, the commit message should be considered as valid ✅
A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., fix(parser):
I see nothing that explicitly forbids multiple scopes, and we already support scope separators like , /, -, and : -- so I see no reason why we can't also support ,.
Sometimes it is convenient to specify multiple scopes in a commit message e.g.
feat(pkg1,pkg2): add some feature
.Current behaviour with v3.0.0
The following command is raising an error:
git commit -m "feat(pkg1,pkg2): add new feature"
Error
Expected behaviour
If the scopes are comma separated, the commit message should be considered as valid ✅
This is something supported by other tools to validate commit message e.g. conventional-changelog/commitlint#901
The text was updated successfully, but these errors were encountered: