Say the Hook Header the Way the Body Already Says It - #645
Merged
Conversation
The header read "on the commit's own scope", which names the staged content, where the hook evaluates the working tree diff against HEAD. The body of the same file already says so, and says why, so the header was the one line disagreeing with the implementation and with the three sentences below it. It now says each gate runs at the scope that fits it, which is what the file documents and what #642 settled: the prose gate is diff-scoped, the line-ending check is repo-wide. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the .husky/pre-commit hook’s header comment so it no longer contradicts the hook’s documented/implemented scoping behavior (diff-scoped prose checks vs repo-wide EOL checks).
Changes:
- Adjust the header comment to describe that each gate runs at the scope appropriate to the check, aligning with the rest of the file’s documentation and behavior.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Answers the one finding on the promotion pull request #643, which cannot take a fix commit of its own: its head is
develop, so the correction reaches it by landing here first.Accepted. The header named the staged content where the hook evaluates the working tree diff against
HEAD. The body of the same file already said so, and said why, so the header was the single line disagreeing both with the implementation and with the three sentences under it. That is the worse shape of the two, since a reader who stops at the header gets a wrong answer that the file itself contradicts further down.It now says each gate runs at the scope that fits it, which is what the file documents and what #642 settled: the prose gate is diff-scoped against
HEAD, and the line-ending check is repo-wide because it reads.gitattributesagainst.editorconfigand takes no file list.The hook ran on this commit and exits 0.
🤖 Generated with Claude Code