feat: split Dockerfile into dedicated lint stage #43

Closed
clawbot wants to merge 1 commits from fix/41-split-dockerfile into main
Collaborator

Summary

Add a dedicated lint stage using the pre-built golangci/golangci-lint:v1.64.8 image for fast lint feedback, separate from the build stage.

Changes

  • Lint stage: Uses golangci/golangci-lint:v1.64.8 (pinned by sha256) with protobuf-compiler installed for code generation, then runs make lint
  • Build stage: Pins sneak/builder:2022-12-08 by sha256 (d61175...), removes inline golangci-lint run (now in lint stage)
  • Final stage: Unchanged — FROM scratch with binary and source archive
  • 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 #41

## Summary Add a dedicated lint stage using the pre-built `golangci/golangci-lint:v1.64.8` image for fast lint feedback, separate from the build stage. ## Changes - **Lint stage**: Uses `golangci/golangci-lint:v1.64.8` (pinned by sha256) with protobuf-compiler installed for code generation, then runs `make lint` - **Build stage**: Pins `sneak/builder:2022-12-08` by sha256 (`d61175...`), removes inline `golangci-lint run` (now in lint stage) - **Final stage**: Unchanged — `FROM scratch` with binary and source archive - `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 [#41](https://git.eeqj.de/sneak/mfer/issues/41) <!-- session: agent:sdlc-manager:subagent:b640dba6-09b2-4574-8891-757cb72adc9d -->
clawbot added 1 commit 2026-03-02 09:03:46 +01:00
Add pre-built golangci/golangci-lint:v1.64.8 image as a separate lint
stage for fast lint feedback without rebuilding the entire builder.

- Lint stage: installs protobuf-compiler, generates code, runs make lint
- Build stage: pins sneak/builder by sha256, removes inline golangci-lint
- COPY --from=lint forces BuildKit to execute the lint stage
- All images pinned by sha256 digest
- Final stage (FROM scratch) unchanged
clawbot added the
bot
needs-review
labels 2026-03-02 09:04:17 +01:00
Author
Collaborator

Closing — the referenced issue #42 was already closed.

Closing — the referenced issue #42 was already closed.
clawbot closed this pull request 2026-03-02 09:04:56 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/mfer#43
No description provided.