mirror of
https://github.com/Homebrew/brew.git
synced 2026-08-12 22:29:27 +04:00
Run brew lgtm on stop in AI hooks
- replace the per-edit `style --changed --fix` and `typecheck` `PostToolUse` hooks and the `tests --changed` `Stop` hook with a single `./bin/brew lgtm` on `Stop` in `.claude/settings.json` - add a matching Codex `Stop` hook in `.codex/hooks.json`, unignoring `.codex` like `.claude`, so both agents run the same check - `brew lgtm` runs typecheck, style and the relevant tests together
This commit is contained in:
+1
-16
@@ -1,26 +1,11 @@
|
||||
{
|
||||
"hooks": {
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Edit|Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "./bin/brew style --changed --fix"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "./bin/brew typecheck"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Stop": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "./bin/brew tests --changed",
|
||||
"command": "./bin/brew lgtm",
|
||||
"timeout": 360
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"hooks": {
|
||||
"Stop": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "./bin/brew lgtm",
|
||||
"timeout": 360
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -219,6 +219,7 @@
|
||||
# Unignore AI configuration
|
||||
!/.cursor
|
||||
!/.claude
|
||||
!/.codex
|
||||
|
||||
# Ignore local AI configuration
|
||||
/.claude/settings.local.json
|
||||
|
||||
Reference in New Issue
Block a user