feat(ai): gRPC clients 扩展 + server interceptors + proto_gen + 测试 + nextstep 文档
This commit is contained in:
@@ -2,7 +2,15 @@ module.exports = {
|
||||
'*.{ts,tsx}': ['eslint --fix', 'prettier --write'],
|
||||
// Go 工具链不在 git hook PATH 中,Go 文件格式化由 go fmt 手动执行
|
||||
// golangci-lint 安装后恢复:['gofmt -w', 'golangci-lint run --fix']
|
||||
'*.py': ['ruff check --fix', 'ruff format'],
|
||||
// 排除 proto_gen(自动生成的 gRPC stub)和 .coverage(二进制文件)
|
||||
'*.py': (files) => {
|
||||
const filtered = files.filter(
|
||||
(f) => !f.includes('proto_gen') && !f.endsWith('.coverage'),
|
||||
);
|
||||
return filtered.length > 0
|
||||
? [`ruff check --fix ${filtered.map((f) => `"${f}"`).join(' ')}`, `ruff format ${filtered.map((f) => `"${f}"`).join(' ')}`]
|
||||
: [];
|
||||
},
|
||||
// buf format 一次只接受 1 个文件参数,需逐个调用
|
||||
'*.proto': (files) => files.map((file) => `buf format --write "${file}"`),
|
||||
'*.md': ['prettier --write'],
|
||||
|
||||
Reference in New Issue
Block a user