Per sdlc-manager#6: split the Dockerfile into separate stages so lint failures surface faster and we stop downloading golangci-lint on every build.
Proposed structure:
Lint stage: Use golangci/golangci-lint image (pinned by sha256). Run golangci-lint run and make fmt-check.
Build stage: Use standard golang image (pinned by sha256). Run make test and make build.
Final stage: Unchanged.
Benefits:
Lint failures fail in seconds (no golangci-lint download)
make fmt-check also fails fast in lint stage
Build stage only does tests + compile
Eliminates repeated golangci-lint downloads
Per [sdlc-manager#6](https://git.eeqj.de/clawbot/sdlc-manager/issues/6): split the Dockerfile into separate stages so lint failures surface faster and we stop downloading golangci-lint on every build.
**Proposed structure:**
1. **Lint stage**: Use `golangci/golangci-lint` image (pinned by sha256). Run `golangci-lint run` and `make fmt-check`.
2. **Build stage**: Use standard `golang` image (pinned by sha256). Run `make test` and `make build`.
3. **Final stage**: Unchanged.
Benefits:
- Lint failures fail in seconds (no golangci-lint download)
- `make fmt-check` also fails fast in lint stage
- Build stage only does tests + compile
- Eliminates repeated golangci-lint downloads
clawbot
self-assigned this 2026-03-01 19:27:19 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Per sdlc-manager#6: split the Dockerfile into separate stages so lint failures surface faster and we stop downloading golangci-lint on every build.
Proposed structure:
golangci/golangci-lintimage (pinned by sha256). Rungolangci-lint runandmake fmt-check.golangimage (pinned by sha256). Runmake testandmake build.Benefits:
make fmt-checkalso fails fast in lint stage