-
Notifications
You must be signed in to change notification settings - Fork 919
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
fix: Message scope validation for forbidden scopes is incorrect #3779
Comments
As extra info: Fixing this error will require a refactoring of tests here too https://github.com/conventional-changelog/commitlint/blob/renovate/conventional-changelog-angular-7.x/%40commitlint/rules/src/scope-enum.test.ts Once this error is covered, conventional changelog angular 7.x could be finally released and this could resolve these issues #3698 and release-it/conventional-changelog#70 |
@silversonicaxel this issue was pre-existing so the conventional changelog angular upgrade can be done without addressing it. |
Looking forward to new release! Thanks |
Should this be closed? @joberstein note, this would have been closed automatically if you had used the word "Fixes" or "Closes" in your PR or commit msg. |
Thanks @knocte ! |
Reference documentation: https://github.com/conventional-changelog/commitlint/blob/36c58e3d0ba677280a17388cb5bbf58f4627a56a/docs/reference-rules.md#scope-enum
Expected Behavior
If any of the forbidden ('never') scopes are supplied as message scopes, the scope-enum validator should fail. Otherwise, it should pass.
Current Behavior
The scope-enum validator fails only if all of the message scopes are listed as forbidden ('never') scopes. Otherwise, it passes.
Affected packages
Possible Solution
Rework the scope-enum 'never' validation to be it's own condition, not simply the negation of the 'always' validation.
Steps to Reproduce
Context
Discovered in PR: #3725 as a result of failing tests.
commitlint --version
@commitlint/[email protected]
git --version
2.41.0
node --version
20.9.0
The text was updated successfully, but these errors were encountered: