Skip to content

Commit

Permalink
update golangci-lint to 1.54.2
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Oct 17, 2023
1 parent 707caaf commit 46d996e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
13 changes: 7 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ linters:

linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
# The io/ioutil package has been deprecated.
# https://go.dev/doc/go1.16#ioutil
- io/ioutil
rules:
main:
deny:
# The io/ioutil package has been deprecated.
# https://go.dev/doc/go1.16#ioutil
- pkg: "io/ioutil"
desc: The io/ioutil package has been deprecated.
forbidigo:
forbid:
- '^fmt\.Errorf(# use errors\.Errorf instead)?$'
Expand Down
10 changes: 7 additions & 3 deletions hack/dockerfiles/lint.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 46d996e

Please sign in to comment.