Repository navigation
feat: subject length 0 turns the length check off - #660
Conversation
subject_max_length = 0 used to mean a limit of 0 characters, so every commit failed. A project that only wants the AI check (ai_attribution = "forbid", conventional_commits = false) still got the default 80-character limit and had to pick an arbitrary large number to get rid of it; dependency-update subjects from Renovate often run past 80. 0 now switches subject_max_length and subject_min_length off, as max_path_length = 0 already does for the files check.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
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. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 2458 2460 +2
Branches 477 478 +1
=========================================
+ Hits 2458 2460 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will not alter performance1 warning
Performance Changes
Comparing Footnotes
|



What
subject_max_length = 0used to mean "at most 0 characters", which failed every commit. So a project that only wants the AI check (ai_attribution = "forbid",conventional_commits = false) still got the default 80-character limit, with no clean way to turn it off. Projects that run the AI check alone set the limit to an arbitrary number such as 150 or 1000, or their dependency-update PRs fail. Renovate subjects such asUpdate dependency com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer to v20261103run to 95 characters.Now
0turnssubject_max_lengthandsubject_min_lengthoff, the same waymax_path_length = 0already turns off the files check.Before / after
subject_max_length = 0[FAIL] CC004 subject-max-lengthon every commitsubject_min_length = 0Co-authored-by: Claude <noreply@anthropic.com>subject_max_length = 72A project that only wants the AI check now needs:
The
--subject-max-length/--subject-min-lengthhelp text and the README table now say that 0 turns the check off. Negative values are treated as off too, likemax_path_length.Checks
pytest: 1488 passed. New tests cover 0 and -1 for both keys, plus an end-to-end run of the AI-only setup. The one failure,test_load_config_file_permission_error, also fails on main when run as root. ruff check and ruff format are clean.The commit-check.com docs (configuration reference + an "AI check only" recipe) follow in a separate PR.