Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Conversation

@benediktziegler
Copy link

@benediktzieglerbenediktziegler commentedDec 1, 2025
edited
Loading

Description

This PR adds functionality to customise the commit message validation and to format theInvalidCommitMessageError to give better/more detailed feedback to the user.

Checklist

  • Add test cases to all the changes you introduce
  • Run./scripts/format and./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

The developer of a custom commitizen class can override thevalidate_commit_message andformat_error_message methods 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 thetest_check_command_with_custom_validator_succeed andtest_check_command_with_custom_validator_fail tests intest_check_command.py.

Additional context

This PR implements and fixes the comments from#648.
Cleaned up version of#1236

@codecov
Copy link

codecovbot commentedDec 1, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Pleaseupload report for BASE (v4-11-0@701de0a).Learn more about missing BASE report.

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
FlagCoverage Δ
unittests98.68% <100.00%> (?)

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fair enough.@Lee-W let me know if I should move the content if#1657 gets merged first.

@benediktziegler
Copy link
Author

Using#1236 instead as it is the same now.

Lee-W reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bearomorphismbearomorphismbearomorphism left review comments

@woilewoileAwaiting requested review from woilewoile will be requested when the pull request is marked ready for reviewwoile is a code owner

@Lee-WLee-WAwaiting requested review from Lee-WLee-W will be requested when the pull request is marked ready for reviewLee-W is a code owner

@noirbizarrenoirbizarreAwaiting requested review from noirbizarrenoirbizarre will be requested when the pull request is marked ready for reviewnoirbizarre is a code owner

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@benediktziegler@bearomorphism

[8]ページ先頭

©2009-2025 Movatter.jp