split Dockerfile into dedicated lint stage for faster CI

Use the golangci/golangci-lint image directly as a lint stage that runs
fmt-check and lint, rather than copying the binary into the builder stage.
BuildKit runs lint and test stages in parallel, so formatting and lint
failures surface much faster.

The COPY --from=lint dependency ensures BuildKit always executes the lint
stage (without it, unused stages are silently skipped).

Also add lint to the Makefile check target prereqs to match REPO_POLICIES
(check: test lint fmt-check).
This commit is contained in:
clawbot
2026-03-15 10:54:13 -07:00
parent b3d10106e1
commit 996875ae29
2 changed files with 26 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ $(PROTOC_GEN_GO):
fixme:
@grep -nir fixme . | grep -v Makefile
check: test fmt-check
check: test lint fmt-check
fmt-check: mfer/mf.pb.go
sh -c 'test -z "$$(gofmt -l .)"'