Split the Dockerfile into a dedicated lint stage using the pre-built golangci/golangci-lint:v2.1.6 image, so lint and formatting failures surface much faster without downloading golangci-lint on every build.
Changes
Lint stage: Uses pre-built golangci/golangci-lint:v2.1.6 (pinned by sha256) to run make fmt-check and make lint
Build stage: Standard golang:1.24-alpine (pinned by sha256) runs make test and builds both chatd and chat-cli binaries
Runtime stage: Unchanged — same Alpine base, same healthcheck, same entrypoint
## Summary
Split the Dockerfile into a dedicated lint stage using the pre-built `golangci/golangci-lint:v2.1.6` image, so lint and formatting failures surface much faster without downloading golangci-lint on every build.
## Changes
- **Lint stage**: Uses pre-built `golangci/golangci-lint:v2.1.6` (pinned by sha256) to run `make fmt-check` and `make lint`
- **Build stage**: Standard `golang:1.24-alpine` (pinned by sha256) runs `make test` and builds both `chatd` and `chat-cli` binaries
- **Runtime stage**: Unchanged — same Alpine base, same healthcheck, same entrypoint
- `COPY --from=lint /src/go.sum /dev/null` creates BuildKit stage dependency to ensure lint always runs
- All image references pinned by sha256 digest per REPO_POLICIES
Closes [#29](https://git.eeqj.de/sneak/chat/issues/29)
<!-- session: agent:sdlc-manager:subagent:b640dba6-09b2-4574-8891-757cb72adc9d -->
Use pre-built golangci/golangci-lint:v2.1.6 image for fast lint feedback
instead of installing golangci-lint from source on every build.
- Lint stage: runs fmt-check and lint using pre-built image
- Build stage: runs tests and compiles binaries
- COPY --from=lint forces BuildKit to execute the lint stage
- All images pinned by sha256 digest
- Runtime stage unchanged
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-lint:v2.1.6image, so lint and formatting failures surface much faster without downloading golangci-lint on every build.Changes
golangci/golangci-lint:v2.1.6(pinned by sha256) to runmake fmt-checkandmake lintgolang:1.24-alpine(pinned by sha256) runsmake testand builds bothchatdandchat-clibinariesCOPY --from=lint /src/go.sum /dev/nullcreates BuildKit stage dependency to ensure lint always runsCloses #29
Closing — the referenced issue #30 was already closed.
Pull request closed