Verify .golangci.yml against the linter schema in make lint

golangci-lint ignores keys it does not know and silently runs with
defaults, which is how the v1-era settings went unapplied. make lint now
runs golangci-lint config verify before golangci-lint run, in both the
Docker and the in-image paths.
This commit is contained in:
2026-11-01 16:31:30 -08:00
parent e1b385f847
commit 09ec70009d
2 changed files with 14 additions and 7 deletions
+7 -5
View File
@@ -224,11 +224,13 @@ Go, prettier for markdown), `make check` for all three, `make build`,
install the pinned prettier.
`make lint` runs golangci-lint inside the same hash-pinned Docker image the CI
build uses, so local results match CI exactly. The `Dockerfile` splits
`make check` across stages: a lint stage and a markdown-check stage fail fast in
seconds, and the build stage, which runs the tests and compiles `sutil`, depends
on both. The runtime image carries the binary and the source it was built from.
Every external reference, from base images to the GitHub Action in
build uses, so local results match CI exactly, and first verifies
`.golangci.yml` against the linter's schema, because golangci-lint otherwise
ignores keys it does not know and silently runs with defaults. The `Dockerfile`
splits `make check` across stages: a lint stage and a markdown-check stage fail
fast in seconds, and the build stage, which runs the tests and compiles `sutil`,
depends on both. The runtime image carries the binary and the source it was
built from. Every external reference, from base images to the GitHub Action in
`.gitea/workflows/check.yml`, is pinned by content hash with a version and date
comment. `.golangci.yml` is this repo's copy of the standard configuration, kept
in the v2 layout with `exhaustruct_v5` and the deprecated `gomodguard` disabled.