feat(hooks): let driftcheck skip intentionally non-executable scripts#64
Merged
Conversation
…#56) Repo-relative glob patterns in ~/.claude/hooks/driftcheck-ignore exempt files from the shebang/exec-bit consistency check, for repos whose documented convention conflicts (sourced-only settings files, scripts chmod'd at their install destination). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Adds ignore support to the
driftcheck.shStop hook so repos with intentionally non-executable scripts (e.g.navecho_monorepo, where run scripts arechmod'd at their install destination) no longer block the end of every Claude Code session.Closes #56
Design note — diverges from the issue's original spec
Issue #56 proposed a per-repo
.driftcheckignorecommitted at each repo root. What this PR ships instead is a single global ignore file at~/.claude/hooks/driftcheck-ignore, holding repo-relative glob patterns (one per line,#comments and blank lines allowed). This is the design that ended up in the working copy — it avoids committing a Claude-tooling dotfile into third-party/work repos.Trade-off to be aware of when reviewing: because the file is global, its repo-relative patterns apply in every repo — e.g.
workstation_install/*/settings.shwould also exempt an identically-shaped path in an unrelated project. If you'd rather have the per-repo semantics from the issue, say so and I'll swap the implementation.Testing
shellcheck --severity=warningclean (SC2053 explicitly disabled — unquoted RHS glob match is the point).$HOME:🤖 Generated with Claude Code