Split the Dockerfile into a dedicated lint stage using the pre-built golangci/golangci-lint image, so lint and formatting failures surface much faster without downloading golangci-lint on every build.
Changes
New lint stage: Uses golangci/golangci-lint:v2.10.1 (sha256-pinned) with CGO deps for vips/libheif static analysis
Lint stage runs: make fmt-check + make lint — fast feedback on formatting/lint issues
Build stage runs: make test + binary compilation only
Removed: Manual golangci-lint binary download (17-line curl/checksum/extract block) — now handled by the pre-built image
Removed: curl from build stage deps (no longer needed)
Added: COPY --from=lint /src/go.sum /dev/null to force BuildKit to run the lint stage
Runtime stage: Unchanged
Verification
docker build . passes — lint, fmt-check, all tests, and binary compilation complete successfully.
## Summary
Split the Dockerfile into a dedicated lint stage using the pre-built `golangci/golangci-lint` image, so lint and formatting failures surface much faster without downloading golangci-lint on every build.
## Changes
- **New lint stage**: Uses `golangci/golangci-lint:v2.10.1` (sha256-pinned) with CGO deps for vips/libheif static analysis
- **Lint stage runs**: `make fmt-check` + `make lint` — fast feedback on formatting/lint issues
- **Build stage runs**: `make test` + binary compilation only
- **Removed**: Manual golangci-lint binary download (17-line curl/checksum/extract block) — now handled by the pre-built image
- **Removed**: `curl` from build stage deps (no longer needed)
- **Added**: `COPY --from=lint /src/go.sum /dev/null` to force BuildKit to run the lint stage
- **Runtime stage**: Unchanged
## Verification
`docker build .` passes — lint, fmt-check, all tests, and binary compilation complete successfully.
closes https://git.eeqj.de/sneak/pixa/issues/20
`session: agent:sdlc-manager:subagent:fe0f0b24-ba66-4dc5-826c-a93700f6a93e`
- Add dedicated lint stage using pre-built golangci-lint v2.10.1 image
- Move fmt-check and lint from build stage to lint stage for faster feedback
- Remove manual golangci-lint binary download (now handled by lint image)
- Remove curl from build stage dependencies (no longer needed)
- Add COPY --from=lint dependency to force BuildKit to run lint stage
- Build stage now runs only tests and compilation
closes #20
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.
Summary
Split the Dockerfile into a dedicated lint stage using the pre-built
golangci/golangci-lintimage, so lint and formatting failures surface much faster without downloading golangci-lint on every build.Changes
golangci/golangci-lint:v2.10.1(sha256-pinned) with CGO deps for vips/libheif static analysismake fmt-check+make lint— fast feedback on formatting/lint issuesmake test+ binary compilation onlycurlfrom build stage deps (no longer needed)COPY --from=lint /src/go.sum /dev/nullto force BuildKit to run the lint stageVerification
docker build .passes — lint, fmt-check, all tests, and binary compilation complete successfully.closes #20
session: agent:sdlc-manager:subagent:fe0f0b24-ba66-4dc5-826c-a93700f6a93eClosing — the referenced issue #21 was already closed.
Pull request closed