Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork304
feat: add custom validation#1680
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat: add custom validation#1680
Conversation
codecovbot commentedDec 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## v4-11-0 #1680 +/- ##========================================== Coverage ? 98.68% ========================================== Files ? 60 Lines ? 2655 Branches ? 0 ========================================== Hits ? 2620 Misses ? 35 Partials ? 0
Flags with carried forward coverage won't be shown.Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Just note that this file will probably be removed in#1657
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.
benediktziegler commentedDec 2, 2025
Using#1236 instead as it is the same now. |
Uh oh!
There was an error while loading.Please reload this page.
Description
This PR adds functionality to customise the commit message validation and to format the
InvalidCommitMessageErrorto give better/more detailed feedback to the user.Checklist
./scripts/formatand./scripts/testlocally to ensure this change passes linter check and testExpected behavior
The developer of a custom commitizen class can override the
validate_commit_messageandformat_error_messagemethods to perform more complex commit message format checks then just a regex match and give more detailed feedback on failure.Steps to Test This Pull Request
Run the the
test_check_command_with_custom_validator_succeedandtest_check_command_with_custom_validator_failtests intest_check_command.py.Additional context
This PR implements and fixes the comments from#648.
Cleaned up version of#1236