snapshot of c000b74a5b09c433f96a69fa102c5c8f6583dff0 Annotations about the code that implements koment.

.mise/config.toml

1 [tools]
2 actionlint = "1.7.12"
3 "github:koment-dev/koment" = "3.1.5"
4 go = "1.26.6"
5 "go:golang.org/x/vuln/cmd/govulncheck" = "1.7.0"
6 golangci-lint = "2.12.2"
7 helm = "4.2.4"
8 helm-docs = "1.14.2"
9 lefthook = "2.1.10"
10 zizmor = "1.29.0"
11
12 [tasks.build]
13 description = "Compile every package"
14 run = "go build ./..."
15
16 [tasks.vet]
17 description = "Run go vet"
18 run = "go vet ./..."
19
20 [tasks.vulncheck]
21 description = "Scan reachable Go code for known vulnerabilities"
22 run = "govulncheck ./..."
23
24 [tasks.test]
25 description = "Run tests with the race detector and coverage"
26 run = "go test -race -covermode=atomic -coverprofile=coverage.out ./..."
27
28 [tasks.fuzz]
29 description = "Fuzz the parsers that read bytes koment did not write"
30 run = """
31 seconds="${KOMENT_FUZZTIME:-30s}"
32 go test ./internal/commentpolicy -run FuzzScanSpansStaysInsideTheContent -fuzz FuzzScanSpansStaysInsideTheContent -fuzztime "$seconds"
33 go test ./internal/commentpolicy -run FuzzScanNeverPanicsOnAnyFile -fuzz FuzzScanNeverPanicsOnAnyFile -fuzztime "$seconds"
34 go test ./internal/store -run FuzzDecodeAnnotationRejectsRatherThanPanics -fuzz FuzzDecodeAnnotationRejectsRatherThanPanics -fuzztime "$seconds"
35 """
36
37 [tasks.fmt]
38 description = "Format Go source"
39 run = "gofmt -w ."
40
41 [tasks.fmt-check]
42 description = "Reject unformatted Go source"
43 run = "test -z \"$(gofmt -l .)\" || { gofmt -l .; exit 1; }"
44
45 [tasks.lint]
46 description = "Run golangci-lint"
47 run = "golangci-lint run ./..."
48
49 [tasks.lint-fix]
50 description = "Apply safe golangci-lint fixes"
51 run = "golangci-lint run --fix ./..."
52
53 [tasks.tidy-check]
54 description = "Reject stale Go module metadata"
55 run = """
56 before_mod=$(mktemp)
57 before_sum=$(mktemp)
58 trap 'rm -f "$before_mod" "$before_sum"' EXIT HUP INT TERM
59 cp go.mod "$before_mod"
60 cp go.sum "$before_sum"
61 go mod tidy
62 if ! cmp -s "$before_mod" go.mod || ! cmp -s "$before_sum" go.sum; then
63 git --no-pager diff --no-ext-diff -- go.mod go.sum
64 exit 1
65 fi
66 """
67
68 [tasks.generate-check]
69 description = "Reject stale generated files"
70 run = """
71 before=$(mktemp)
72 after=$(mktemp)
73 trap 'rm -f "$before" "$after"' EXIT HUP INT TERM
74 snapshot() {
75 git status --porcelain=v1 --untracked-files=all
76 git --no-pager diff --no-ext-diff --binary HEAD
77 }
78 snapshot >"$before"
79 go generate ./...
80 go run ./internal/projectlayout/cmd/layout render
81 helm-docs --chart-search-root=distribution/helm
82 snapshot >"$after"
83 if ! cmp -s "$before" "$after"; then
84 git status --short
85 exit 1
86 fi
87 """
88
89 [tasks.annotations]
90 description = "Verify koment's annotations"
91 run = "go run ./cmd/koment check"
92
93 [tasks.layout-check]
94 description = "Reject paths outside the repository layout contract"
95 run = "go run ./internal/projectlayout/cmd/layout check"
96
97 [tasks.layout-render]
98 description = "Render the repository layout reference"
99 run = "go run ./internal/projectlayout/cmd/layout render"
100
101 [tasks.comments]
102 description = "Reject comments that bypass koment policy"
103 run = "go run ./cmd/koment comments check"
104
105 [tasks.agent-policy]
106 description = "Reject stale or missing agent adapters"
107 run = "go run ./cmd/koment agents check"
108
109 [tasks.commitlint]
110 description = "Lint commit subjects against Conventional Commits 1.0.0"
111 run = """
112 git log --format=%s origin/main..HEAD | ./scripts/commitlint.sh
113 """
114
115 [tasks.workflow-lint]
116 description = "Lint and audit GitHub Actions"
117 run = """
118 actionlint
119 zizmor --strict-collection .github/workflows action.yml
120 """
121
122 [tasks.release-helper-test]
123 description = "Test identifier-based GitHub release asset publication"
124 run = "./scripts/upload-release-assets_test.sh"
125
126 [tasks.helm-lint]
127 description = "Lint the Helm chart"
128 run = "helm lint distribution/helm/koment"
129
130 [tasks.helm-template]
131 description = "Render the unified server and hardened optional resources"
132 run = """
133 helm template koment distribution/helm/koment >/dev/null
134 helm template koment distribution/helm/koment \
135 --set metrics.enabled=true \
136 --set github.existingSecret=koment-provider \
137 --set auth.existingSecret=koment-agents \
138 --set auth.humanWrites=true \
139 --set networkPolicy.enabled=true \
140 --set podDisruptionBudget.enabled=true >/dev/null
141 """
142
143 [tasks.extension-test]
144 description = "Test the dependency-free VS Code protocol client"
145 run = "mise --cd integrations/editors/vscode run test"
146
147 [hooks]
148 postinstall = "lefthook install"

Find an annotation

Search file paths, rationale, kinds, and authors.

moveEnter openEsc close