Add critical instructions and hooks for Claude Code#8715
Add critical instructions and hooks for Claude Code#8715mergify[bot] merged 12 commits intosigp:unstablefrom
Conversation
- Add CRITICAL section at top of CLAUDE.md to ensure Claude always runs `cargo fmt --all && make lint-fix` and `cargo check` after code changes - Add .claude/settings.json with post-tool-call hook to remind about formatting and linting after Edit/Write operations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
I thought the plan was to add a commit hook that checks |
Do we want to have git hooks that apply to everyone? |
.claude/settings.json
Outdated
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": "echo '\n[Reminder] Run: cargo fmt --all && make lint-fix && cargo check'" |
There was a problem hiding this comment.
I don't think we need cargo check if we already run clippy
There was a problem hiding this comment.
I'm removing the cargo check command and merging this - please correct me if i wrong
pawanjay176
left a comment
There was a problem hiding this comment.
@dapplion I'm wondering why we can't have our own local versions of the settings.json. Why does this need to be committed for everyone?
settings.json at project level is good for sharing hooks and tooling across the team. Your .claude/settings.local.json is not committed and overrides the project level settings |
Add instructions for installing git hooks and cargo toolchain
Removed 'cargo check' from reminder command in settings.
Merge Queue StatusRule:
This pull request spent 42 seconds in the queue, with no time running CI. ReasonThe pull request #8715 has been manually updated HintIf you want to requeue this pull request, you can post a |
Merge Queue StatusRule:
This pull request spent 31 minutes 2 seconds in the queue, including 29 minutes 18 seconds running CI. Required conditions to merge
|
Summary
.claude/settings.jsonwith post-tool-call hook to remind about formatting and linting after Edit/Write operationsThis helps ensure Claude Code consistently follows the project's code quality requirements.
Test plan
🤖 Generated with Claude Code
(Lion here)
Claude recognizes that it ignored Claude.md most of the time, and recommends this edits to actually lint and format when doing changes.