feat: 添加 post-edit hook 自动验证 Python 和 JavaScript 文件
- 新增 .qoder/hooks/post-edit-check.sh 脚本 - 编辑 *.py 文件后自动运行 pytest tests/ -x -q - 编辑 static/js/*.js 文件后自动运行 node --check - 配置 PostToolUse hook 监听 Write|Edit 事件 - 更新 .gitignore 跟踪 hooks 目录和 settings.json
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"hooks": {
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Write|Edit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": ".qoder/hooks/post-edit-check.sh",
|
||||
"timeout": 120
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user