update golangci-lint to 1.54.2

also update config to show all issues at once and
set same exlucde rules as buildkit ones.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-10-19 12:24:07 +02:00
committed by CrazyMax
parent fc7144f61d
commit 6e5aefbb98
2 changed files with 33 additions and 9 deletions

View File

@ -1,10 +1,14 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.21.3
ARG GOLANGCI_LINT_VERSION=1.54.2
FROM golang:${GO_VERSION}-alpine
RUN apk add --no-cache git gcc musl-dev
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.51.1
ENV GOFLAGS="-buildvcs=false"
ARG GOLANGCI_LINT_VERSION
RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v${GOLANGCI_LINT_VERSION}
WORKDIR /go/src/github.com/docker/buildx
RUN --mount=target=/go/src/github.com/docker/buildx --mount=target=/root/.cache,type=cache \
golangci-lint run
RUN --mount=target=/go/src/github.com/docker/buildx \
--mount=target=/root/.cache,type=cache \
golangci-lint run