Conversation
Introduce rule-driven commit message auto-repair with zero new runtime dependencies. When --fix is passed alongside --message, cchk validates the commit, proposes a corrected message, and prompts y/N before amending. --yes skips the prompt (useful in CI and pre-commit hooks). New module: commit_check/fixer.py - CommitFixer.fix() applies transforms in canonical order: allow_wip_commits → subject_imperative → subject_capitalized → require_signed_off_by - _to_imperative() converts past/present verb forms to imperative using a lookup table (simplified→simplify) plus suffix rules (-ed, -ing, -s/-es) - FixResult tracks which checks were fixed and which remain unfixable Engine updates (engine.py): - CheckResult dataclass for per-check result tracking - validate_all_detailed() returns List[CheckResult] - validate_all() delegates to validate_all_detailed() (backward compat) Three operating modes: - Mode A: latest git commit → git commit --amend - Mode B: pre-commit hook file → write fixed message back to file - Mode C: piped stdin → error (amending piped input is not supported) Tests: 139 new tests across fixer_test.py, engine_test.py, main_test.py
- validate_all_detailed(silent=True) redirects stdout/stderr so the ASCII art banner does not appear before the fix proposal - Clean up import ordering in main.py (subprocess with other stdlib) - Add tests: silent output suppression, Mode B file read/write errors
✅ Deploy Preview for commit-check ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use your project's `pylint` configuration to improve the quality of Python code reviews.Add a pylint configuration file to your project to customize how CodeRabbit runs |
|
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #385 +/- ##
==========================================
+ Coverage 94.67% 95.26% +0.59%
==========================================
Files 9 10 +1
Lines 807 1014 +207
==========================================
+ Hits 764 966 +202
- Misses 43 48 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



No description provided.