-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
31 lines (25 loc) · 832 Bytes
/
Copy pathmise.toml
File metadata and controls
31 lines (25 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[tools]
go = "1.26.5"
golangci-lint = "2.12.2"
[tasks.build]
run = "go build ./..."
[tasks.test]
run = "go test ./..."
[tasks.fmt]
run = "golangci-lint fmt"
[tasks.lint]
run = "golangci-lint run"
[tasks.conventions]
run = '''
for f in CLAUDE.md .cursorrules .windsurfrules .clinerules GEMINI.md; do
if [ -e "$f" ]; then echo "forbidden per-tool agent file: $f (use AGENTS.md)"; exit 1; fi
done
files=$(find cmd internal -name '*.go' ! -name '*_test.go')
total=$(cat $files | grep -cv '^[[:space:]]*$')
comments=$(cat $files | grep -E '^[[:space:]]*//' | grep -cvE '^[[:space:]]*//(go:|nolint)' || true)
if [ "$comments" -gt $((total * 5 / 100)) ]; then
echo "comment budget exceeded: $comments comment lines > 5% of $total code lines"; exit 1
fi
'''
[tasks.check]
depends = ["fmt", "build", "test", "lint", "conventions"]