lint: run in go-modules mode

Prevent the linter from recursing to other modules (cmd/docker-trust),
which don't have their dependencies vendored.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-11-05 09:30:20 +01:00
parent b2aa690b26
commit cee9ea67fc

View File

@ -18,6 +18,9 @@ ENV CGO_ENABLED=0
ENV GOGC=75
WORKDIR /go/src/github.com/docker/cli
COPY --link --from=golangci-lint /usr/bin/golangci-lint /usr/bin/golangci-lint
RUN --mount=type=bind,target=. \
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/root/.cache \
rm -f go.mod go.sum && \
ln -s vendor.mod go.mod && \
ln -s vendor.sum go.sum && \
golangci-lint run