Run all linting in Docker via Dockerfile.lint (closes #188)
Check / check (pull_request) Successful in 1m29s
Check / check (pull_request) Successful in 1m29s
Per the owner ruling, linting now runs only inside Docker with the pinned golangci-lint (v2.12.2). A root Dockerfile.lint runs the linter as a build step; script/lint just builds it. A GATE_RUN build arg forces the lint layer to execute every run so a cached build cannot report a false clean. script/bootstrap no longer installs golangci-lint (the goimports install stays). The main Dockerfile lint stage calls golangci-lint directly (no docker-in-docker) and still gates the build. config verify is omitted because it fetches its schema over an unpinned HTTPS call. Model: opus-4-8
This commit was merged in pull request #200.
This commit is contained in:
+5
-1
@@ -8,8 +8,12 @@ RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
# golangci-lint is invoked directly here, not via `make lint`: script/lint
|
||||
# now runs the linter by building Dockerfile.lint, and shelling out to
|
||||
# `docker build` from inside this image build would be docker-in-docker.
|
||||
# This image is golangci/golangci-lint, so the pinned linter is on PATH.
|
||||
RUN make fmt-check
|
||||
RUN make lint
|
||||
RUN golangci-lint run --config .golangci.yml ./...
|
||||
|
||||
# Build stage — tests and compilation
|
||||
# golang:1.25-alpine
|
||||
|
||||
Reference in New Issue
Block a user