chore: add pre-commit fmt+clippy hooks, fix clippy warnings

This commit is contained in:
2026-05-17 12:09:24 +02:00
parent d813e59b5c
commit 2d1044e5c3
3 changed files with 27 additions and 7 deletions

18
.claude/settings.json Normal file
View File

@@ -0,0 +1,18 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"if": "Bash(git commit*)",
"command": "cargo fmt --all 2>&1 && cargo clippy --workspace 2>&1 || echo '{\"continue\": false, \"stopReason\": \"cargo fmt or clippy failed — fix before committing\"}'",
"timeout": 120,
"statusMessage": "Running cargo fmt + clippy..."
}
]
}
]
}
}