Run the linter only in Docker (closes #20)
check / check (push) Successful in 56s
check / check (pull_request) Successful in 51s

script/lint now builds the new Dockerfile.lint, whose last step runs
golangci-lint. The build cache is off, so every run executes the
linter, and no image is kept. The Dockerfile lint stage calls
golangci-lint directly, since make lint is now a docker build of its
own. script/fmt no longer runs golangci-lint --fix, and
script/bootstrap no longer installs it. golangci-lint config verify is
left out: it fetches its schema over the network, unpinned. The README,
TODO.md and the script/cibuild comment say what now runs.

Model: opus-5-5
This commit is contained in:
2026-10-06 03:11:54 +00:00
parent b28c0dca0c
commit 6932e3adce
8 changed files with 32 additions and 17 deletions
+6 -5
View File
@@ -113,16 +113,17 @@ development workflow, and the Makefile targets are thin shims that call them.
The scripts are POSIX sh (not bash) so they run in minimal containers such as
alpine. We provide:
- `script/bootstrap` — install all dependencies (go and golangci-lint if
missing, then `go mod download`)
- `script/bootstrap` — install all dependencies (go if missing, then
`go mod download`); golangci-lint is not installed, since it runs only in
Docker
- `script/setup` — set up the repo for development after a fresh clone: runs
`script/bootstrap`, then `script/install-precommit`
- `script/projectname` — output the project name (our own extension); used by
`script/docker` for the image tag
- `script/test` — run the test suite (`go test -v ./...`)
- `script/lint` — run golangci-lint
- `script/fmt` — format all files (goimports plus `golangci-lint run --fix`;
writes)
- `script/lint` — run golangci-lint in Docker by building `Dockerfile.lint`
without the build cache, so every run lints; keeps no image
- `script/fmt` — format all files with goimports (writes)
- `script/fmt-check` — check formatting (read-only); fails if `gofmt -l`
reports files
- `script/check` — run all checks: `test`, `lint`, `fmt-check` (our own