Skip to content

Commit e202a88

Browse files
committed
Add rubocop hook
1 parent 7a11a22 commit e202a88

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.claude/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"hooks": {
3+
"PostToolUse": [
4+
{
5+
"matcher": "Edit|Write",
6+
"hooks": [
7+
{
8+
"type": "command",
9+
"command": "jq -r '.tool_input.file_path' | { read file_path; if echo \"$file_path\" | grep -q '\\.rb$'; then rubocop -A \"$file_path\" 2>&1 | head -n 20; fi; }"
10+
}
11+
]
12+
}
13+
]
14+
}
15+
}

0 commit comments

Comments
 (0)