Skip to content

Commit 95eebf3

Browse files
committed
Fix golangci-lint after recent Go version update
1 parent 7bb217e commit 95eebf3

File tree

2 files changed

+83
-31
lines changed

2 files changed

+83
-31
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- uses: actions/checkout@v2
5050

5151
- name: Lint
52-
uses: golangci/golangci-lint-action@v2.5.2
52+
uses: golangci/golangci-lint-action@v8
5353
with:
5454
args: "-v"
55-
version: v1.45
55+
version: v2.2.1

.golangci.yaml

Lines changed: 81 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,84 @@
1-
issues:
2-
exclude-rules:
3-
# Disable some linters in tests.
4-
- path: _test\.go
5-
linters:
6-
- funlen
7-
- maligned
8-
- gomnd
9-
- path: adapter/internal/adaptertest
10-
linters:
11-
- funlen
12-
- maligned
13-
- gomnd
14-
1+
version: "2"
152
linters:
3+
default: none
164
enable:
5+
- asasalint
6+
- asciicheck
7+
- bidichk
8+
- containedctx
9+
- contextcheck
10+
- copyloopvar
11+
- cyclop
12+
- decorder
13+
- dogsled
14+
- dupl
15+
- dupword
16+
- durationcheck
17+
- embeddedstructfieldcheck
18+
- errcheck
19+
- errchkjson
20+
- errname
21+
- errorlint
22+
- exhaustive
23+
- exptostd
24+
- fatcontext
25+
- forbidigo
26+
- forcetypeassert
27+
- gocheckcompilerdirectives
28+
- gochecksumtype
29+
- gocognit
30+
- gocritic
31+
- gocyclo
32+
- gomoddirectives
33+
- gomodguard
34+
- goprintffuncname
35+
- gosmopolitan
36+
- govet
37+
- grouper
38+
- iface
39+
- ineffassign
40+
- interfacebloat
41+
- lll
42+
- loggercheck
43+
- maintidx
44+
- makezero
45+
- mirror
46+
- misspell
47+
- nakedret
48+
- nilerr
49+
- nilnesserr
50+
- nilnil
51+
- noctx
52+
- nolintlint
53+
- perfsprint
54+
- prealloc
55+
- reassign
56+
- recvcheck
57+
- revive
58+
- staticcheck
59+
- tagalign
60+
- tagliatelle
61+
- testableexamples
62+
- testifylint
1763
- testpackage
18-
- exportloopref
19-
disable:
20-
- interfacer
21-
- paralleltest
22-
- gofumpt
23-
- exhaustivestruct
24-
- scopelint
25-
- gochecknoglobals
26-
presets:
27-
- bugs
28-
- complexity
29-
- format
30-
- performance
31-
- style
32-
- unused
64+
- thelper
65+
- tparallel
66+
- unconvert
67+
- unparam
68+
- unused
69+
- usestdlibvars
70+
- usetesting
71+
- wastedassign
72+
- whitespace
73+
- wrapcheck
74+
settings:
75+
revive:
76+
severity: warning
77+
cyclop:
78+
max-complexity: 20
79+
nakedret:
80+
max-func-lines: 50
81+
lll:
82+
line-length: 120
83+
gocognit:
84+
min-complexity: 64

0 commit comments

Comments
 (0)