Skip to content

Commit 473d2c1

Browse files
authored
chore: update and clean up golangci-lint (#2165)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 parent 2b5554d commit 473d2c1

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v3
21-
- uses: actions/setup-go@v3
21+
- uses: actions/setup-go@v5
2222
with:
2323
go-version-file: go.mod
24-
cache: true
25-
cache-dependency-path: go.sum
26-
- uses: golangci/golangci-lint-action@v3
24+
- uses: golangci/golangci-lint-action@v6
2725
with:
28-
version: v1.52
29-
skip-cache: true
30-
args: --timeout 10m --verbose
26+
version: v1.63
27+
args: --verbose

.golangci.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,40 @@
22
linters:
33
disable-all: true
44
enable:
5-
- deadcode
6-
- errcheck
7-
- gosimple
8-
- govet
9-
- ineffassign
10-
- staticcheck
11-
- structcheck
12-
- unused
13-
- varcheck
145
- bodyclose
156
- contextcheck
7+
- copyloopvar
168
- cyclop
179
- durationcheck
10+
- errcheck
1811
- errname
1912
- errorlint
20-
- exportloopref
13+
- gocritic
14+
- gofmt
2115
- goimports
2216
- gosec
23-
- gocritic
17+
- gosimple
18+
- govet
19+
- ineffassign
20+
- staticcheck
21+
- unused
2422

2523
linters-settings:
2624
cyclop:
2725
max-complexity: 15
2826
gocritic:
2927
disabled-checks:
3028
- singleCaseSwitch
29+
gosec:
30+
excludes:
31+
- G115
32+
- G306
3133

3234
issues:
3335
exclude-rules:
3436
- path: "."
3537
linters:
3638
- typecheck
39+
40+
run:
41+
timeout: 10m

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typos:
4343

4444
.PHONY: quality
4545
quality:
46-
which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
46+
which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4
4747
golangci-lint run
4848

4949
.PHONY: fix-typos

0 commit comments

Comments
 (0)