docs: clarify hook override limitation (issue #226)#231
docs: clarify hook override limitation (issue #226)#231pangerlkr wants to merge 1 commit intoaffaan-m:mainfrom
Conversation
Update hooks/README.md to clarify that hook override via ~/.claude/settings.json is not currently supported. The documented override mechanism (adding an entry with empty hooks: [] array) does not work because Claude Code merges configurations rather than replacing them. This is a limitation in Claude Code's core configuration system. Adds a prominent note explaining this limitation and referencing issue affaan-m#226. Related: affaan-m#226
📝 WalkthroughWalkthroughDocumentation clarification in the Hooks README updates guidance on disabling hooks, removing instructions for overriding via Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
hooks/README.md (1)
56-68:⚠️ Potential issue | 🟡 MinorConsider removing or clearly labeling this example as non-functional.
The JSON example demonstrates the override pattern that the note above explicitly states doesn't work. This creates potential confusion—readers skimming the documentation might miss the note and attempt to use this pattern, wasting debugging time.
Consider one of these approaches:
- Remove the example entirely (cleanest solution since it documents unsupported functionality)
- Add a clear warning prefix before the code block: "
⚠️ The following does NOT work (shown for reference):"- Provide an alternative that does work, if one exists
📝 Suggested fix: Remove the non-working example
> **Note:** Hook override via `~/.claude/settings.json` is **not currently supported** due to how Claude Code merges configuration files. The documented override mechanism (adding an entry with empty `hooks: []` array) does not work because configurations are merged rather than replaced. This is a limitation in Claude Code's core configuration system. See [Issue `#226`](https://github.com/affaan-m/everything-claude-code/issues/226) for details. -```json -{ - "hooks": { - "PreToolUse": [ - { - "matcher": "Write", - "hooks": [], - "description": "Override: allow all .md file creation" - } - ] - } -} -``` ### Writing Your Own Hook
CI Test Failures - Not Related to This PRThe failing CI tests are not caused by this pull request. This PR contains only documentation changes to Analysis:
Recommendation: The documentation changes successfully:
@affaan-m - Please review the documentation changes themselves. The CI failures should not block this docs update. |
|
[openclaw-bot:pr-review] CI Checks Failing ❌ Some CI checks are not passing on this PR. Please review the failing checks and push fixes. This label will be automatically removed when CI passes on the next run. |
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
affaan-m
left a comment
There was a problem hiding this comment.
Automated review: checks are failing. Please fix failures before review.
Update hooks/README.md to clarify that hook override via ~/.claude/settings.json is not currently supported.
The documented override mechanism (adding an entry with empty hooks: [] array) does not work because Claude Code merges configurations rather than replacing them. This is a limitation in Claude Code's core configuration system.
Adds a prominent note explaining this limitation and referencing issue #226.
Related: #226
Description
Type of Change
fix:Bug fixfeat:New featurerefactor:Code refactoringdocs:Documentationtest:Testschore:Maintenance/toolingci:CI/CD changesChecklist
node tests/run-all.js)Summary by CodeRabbit