Skip to content

Commit fd0585a

Browse files
ci: add cargo check pre-commit hook and Edit matcher for Claude Code
Add local cargo check hook to pre-commit config for Rust files. Add Edit tool matcher to Claude Code PostToolUse hooks so edited files also trigger pre-commit checks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 73fa6c4 commit fd0585a

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.claude/settings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@
8080
"command": "git diff --name-only HEAD | xargs -r prek run --files"
8181
}
8282
]
83+
},
84+
{
85+
"matcher": "Edit",
86+
"hooks": [
87+
{
88+
"type": "command",
89+
"command": "git diff --name-only HEAD | xargs -r prek run --files"
90+
}
91+
]
8392
}
8493
]
8594
}

.pre-commit-config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
fail_fast: true
22

33
repos:
4+
- repo: local
5+
hooks:
6+
- id: cargo-check
7+
name: cargo check
8+
entry: cargo check --manifest-path src-tauri/Cargo.toml --quiet
9+
language: system
10+
types: [rust]
11+
pass_filenames: false
412
- repo: https://github.com/nozaq/pre-commit-deno
513
rev: 0.1.0
614
hooks:

0 commit comments

Comments
 (0)