chore: document comment rules and enforce commit message shape - #2706
Open
balzss wants to merge 1 commit into
Open
chore: document comment rules and enforce commit message shape#2706balzss wants to merge 1 commit into
balzss wants to merge 1 commit into
Conversation
commitlint's headerPattern could not match a scoped subject like `fix(ui-button): ...`, so subject-max-length never applied to anything. Dropping it lets the conventional parser run, which the new subject and body limits rely on. Limits are calibrated against this repo's history: they clear the heaviest real commit and catch changelog-shaped bodies. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Contributor
Visual regression reportCypress suite: ✅ Passing Visual diff: ✅ No changes.
Accessibility (axe): ✅ No violations. 📊 View full report — click a screenshot's ⚠ badge to see each violation boxed on the image, with the offending element named and contrast failures shown as color swatches. Baselines come from the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.md(and a human-facing version in the contributor docs): explain why not what, one line, never reference the change itself.commitlint.config.js'sparserOpts.headerPattern, which couldn't match a scoped subject likefix(ui-button): ..., sosubject-max-lengthhad been applying to nothing. Set it to 72 and addbody-max-lines/body-no-changelog.scripts/claude/check-commit-message.mjs, 20 unit tests) that gives Claude the same feedback before a commit is attempted./tidyfor reviewing comment and commit wording in a working diff, and drop the robot attribution line from commit messages.Test Plan
git log -50 --format='%H' | while read h; do git show -s --format='%s%n%n%b' $h | npx commitlint || echo "^ $h"; done. Expect only over-long subjects to fail.subject-max-length: 72fails ~10% of the last 200 commits on master (all genuinely sprawling subjects). Raising it to 80 halves that, if the team would rather.Fixes INSTUI-5174
🤖 Generated with Claude Code