# Lint image, built by script/lint: golangci-lint runs as a build step, so # a successful build is a clean lint. # golangci/golangci-lint:v2.12.2 (Debian-based), 2026-08-07 FROM golangci/golangci-lint:v2.12.2@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240 AS deps WORKDIR /src COPY go.mod go.sum ./ RUN go mod download # This stage must stay the one that runs golangci-lint, and its name must # match $stage in script/lint. --target halts the build at this stage, so # moving the lint step to another stage, or adding a stage after this one, # is not caught. FROM deps AS lint COPY . . RUN golangci-lint run --config .golangci.yml ./...