Split Dockerfile into lint + build stages for faster CI feedback #152

Merged
sneak merged 2 commits from feature/split-dockerfile-lint-build-stages into main 2026-03-01 21:19:22 +01:00

2 Commits

Author SHA1 Message Date
clawbot
d661c81955 Remove unnecessary goimports install from lint stage
All checks were successful
Check / check (pull_request) Successful in 1m27s
The lint stage only needs golangci-lint (built into base image) and
gofmt for fmt-check. Neither make fmt-check nor make lint uses the
goimports binary directly. Removing it makes the lint stage faster,
which is the whole point of the multi-stage split.

goimports is only used by 'make fmt' which is a local developer
tool, not run during Docker builds.
2026-03-01 11:30:59 -08:00
clawbot
2c4c1beaf9 split Dockerfile into lint + build stages for faster CI feedback
All checks were successful
Check / check (pull_request) Successful in 2m26s
- Add dedicated lint stage using golangci/golangci-lint:v2.10.1 image
  (pinned by sha256 digest) for fast formatting and lint checks
- Keep build stage with golang:1.25-alpine for tests and compilation
- Remove manual golangci-lint download/install from builder stage
- Add fmt-check Makefile target for standalone format checking
- Refactor check target to use fmt-check, lint, test dependencies

The lint stage uses the official golangci-lint image which has the
linter pre-installed, eliminating the need to download it on every
build. Lint failures now surface immediately without waiting for
the download step.

closes #151
2026-03-01 10:32:31 -08:00