.mise/config.toml
1
[tools]
2
actionlint = "1.7.12"
3
"github:koment-dev/koment" = "1.0.0"
4
go = "1.26.5"
5
"go:golang.org/x/vuln/cmd/govulncheck" = "1.6.0"
6
golangci-lint = "2.12.2"
7
helm = "4.2.3"
8
helm-docs = "1.14.2"
9
lefthook = "2.1.10"
10
zizmor = "1.29.0"
12
[tasks.build]
13
description = "Compile every package"
14
run = "go build ./..."
16
[tasks.vet]
17
description = "Run go vet"
18
run = "go vet ./..."
20
[tasks.vulncheck]
21
description = "Scan reachable Go code for known vulnerabilities"
22
run = "govulncheck ./..."
24
[tasks.test]
25
description = "Run tests with the race detector and coverage"
26
run = "go test -race -covermode=atomic -coverprofile=coverage.out ./..."
28
[tasks.fmt]
29
description = "Format Go source"
30
run = "gofmt -w ."
32
[tasks.fmt-check]
33
description = "Reject unformatted Go source"
34
run = "test -z \"$(gofmt -l .)\" || { gofmt -l .; exit 1; }"
36
[tasks.lint]
37
description = "Run golangci-lint"
38
run = "golangci-lint run ./..."
40
[tasks.lint-fix]
41
description = "Apply safe golangci-lint fixes"
42
run = "golangci-lint run --fix ./..."
44
[tasks.tidy-check]
45
description = "Reject stale Go module metadata"
46
run = """
47
before_mod=$(mktemp)
48
before_sum=$(mktemp)
49
trap 'rm -f "$before_mod" "$before_sum"' EXIT HUP INT TERM
50
cp go.mod "$before_mod"
51
cp go.sum "$before_sum"
52
go mod tidy
53
if ! cmp -s "$before_mod" go.mod || ! cmp -s "$before_sum" go.sum; then
54
git --no-pager diff --no-ext-diff -- go.mod go.sum
55
exit 1
56
fi
57
"""
59
[tasks.generate-check]
60
description = "Reject stale generated files"
61
run = """
62
before=$(mktemp)
63
after=$(mktemp)
64
trap 'rm -f "$before" "$after"' EXIT HUP INT TERM
65
snapshot() {
66
git status --porcelain=v1 --untracked-files=all
67
git --no-pager diff --no-ext-diff --binary HEAD
68
}
69
snapshot >"$before"
70
go generate ./...
71
helm-docs --chart-search-root=charts
72
snapshot >"$after"
73
if ! cmp -s "$before" "$after"; then
74
git status --short
75
exit 1
76
fi
77
"""
79
[tasks.annotations]
80
description = "Verify koment's annotations"
81
run = "go run ./cmd/koment check"
83
[tasks.comments]
84
description = "Reject comments that bypass koment policy"
85
run = "go run ./cmd/koment comments check"
87
[tasks.agent-policy]
88
description = "Reject stale or missing agent adapters"
89
run = "go run ./cmd/koment agents check"
91
[tasks.workflow-lint]
92
description = "Lint and audit GitHub Actions"
93
run = """
94
actionlint
95
zizmor --strict-collection .github/workflows action.yml
96
"""
98
[tasks.helm-lint]
99
description = "Lint the Helm chart"
100
run = "helm lint charts/koment"
102
[tasks.helm-template]
103
description = "Render the unified server and hardened optional resources"
104
run = """
105
helm template koment charts/koment >/dev/null
106
helm template koment charts/koment \
107
--set metrics.enabled=true \
108
--set github.existingSecret=koment-provider \
109
--set auth.existingSecret=koment-agents \
110
--set auth.humanWrites=true \
111
--set networkPolicy.enabled=true \
112
--set podDisruptionBudget.enabled=true >/dev/null
113
"""
115
[tasks.extension-test]
116
description = "Test the dependency-free VS Code protocol client"
117
run = "mise --cd editors/vscode run test"
119
[hooks]
120
postinstall = "lefthook install"