Skip to content

Commit 281354c

Browse files
committed
dockerfile: upgrade golangci-lint to 1.45
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
1 parent a23448b commit 281354c

2 files changed

Lines changed: 39 additions & 2 deletions

File tree

.golangci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
run:
2+
timeout: 10m
3+
4+
linters:
5+
enable:
6+
- deadcode
7+
- depguard
8+
- gofmt
9+
- goimports
10+
- revive
11+
- govet
12+
- importas
13+
- ineffassign
14+
- misspell
15+
- typecheck
16+
- varcheck
17+
- errname
18+
- makezero
19+
- whitespace
20+
disable-all: true
21+
22+
linters-settings:
23+
depguard:
24+
list-type: blacklist
25+
include-go-root: true
26+
packages:
27+
# The io/ioutil package has been deprecated.
28+
# https://go.dev/doc/go1.16#ioutil
29+
- io/ioutil
30+
importas:
31+
no-unaliased: true
32+
33+
issues:
34+
exclude-rules:
35+
- linters:
36+
- revive
37+
text: "stutters"

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616

1717
ARG GO_VERSION="1.18"
18-
ARG GOLANGCI_LINT_VERSION="v1.37"
18+
ARG GOLANGCI_LINT_VERSION="v1.45"
1919
ARG ADDLICENSE_VERSION="v1.0.0"
2020

2121
ARG LICENSE_ARGS="-c cli-docs-tool -l apache"
@@ -55,7 +55,7 @@ FROM base AS lint
5555
RUN --mount=type=bind,target=. \
5656
--mount=type=cache,target=/root/.cache \
5757
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
58-
golangci-lint run --timeout 10m0s ./...
58+
golangci-lint run ./...
5959

6060
FROM base AS license-set
6161
ARG LICENSE_ARGS

0 commit comments

Comments
 (0)