Skip to content

Commit 1b98cde

Browse files
committed
wip-bump-linter
1 parent 870b595 commit 1b98cde

2 files changed

Lines changed: 85 additions & 34 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
run: ./build.sh
3232

3333
- name: golangci-lint
34-
uses: golangci/golangci-lint-action@v6
34+
uses: golangci/golangci-lint-action@v7
3535
with:
36-
version: v1.60.1
36+
version: v2.1.1
3737

3838
# - name: check for SPDX tags
3939
# run: ./tools/spdx-ensure

.golangci.yml

Lines changed: 83 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,93 @@
1+
version: "2"
12
linters:
2-
presets:
3-
# found in: golangci-lint help linters
4-
- bugs
5-
- comment
6-
- complexity
7-
- error
8-
- format
9-
- import
10-
- metalinter
11-
- module
12-
- performance
13-
- sql
14-
# - style # turned off, can be too much
15-
- test
16-
- unused
3+
enable:
4+
- asasalint
5+
- asciicheck
6+
- bidichk
7+
- bodyclose
8+
- contextcheck
9+
- dupword
10+
- durationcheck
11+
- errchkjson
12+
- errorlint
13+
- exhaustive
14+
- fatcontext
15+
- gocheckcompilerdirectives
16+
- gochecksumtype
17+
- gocritic
18+
- gomoddirectives
19+
- gomodguard
20+
- gosec
21+
- gosmopolitan
22+
- loggercheck
23+
- maintidx
24+
- makezero
25+
- misspell
26+
- musttag
27+
- nilerr
28+
- nilnesserr
29+
- noctx
30+
- paralleltest
31+
- prealloc
32+
- protogetter
33+
- reassign
34+
- recvcheck
35+
- revive
36+
- rowserrcheck
37+
- spancheck
38+
- sqlclosecheck
39+
- testableexamples
40+
- testifylint
41+
- testpackage
42+
- thelper
43+
- tparallel
44+
- unparam
45+
- usetesting
46+
- zerologlint
1747
disable:
18-
- perfsprint # for perf, skip for now
1948
- cyclop
20-
- gocyclo
49+
- depguard
50+
- err113
51+
- exhaustruct
2152
- funlen
2253
- gocognit
23-
- nestif
24-
- exhaustruct # TODO? annoying for now
25-
- err113 # TODO enable later
54+
- gocyclo
2655
- godot
2756
- godox
28-
- depguard
29-
- wrapcheck # TODO enable?
30-
57+
- nestif
58+
- perfsprint
59+
- wrapcheck
60+
settings:
61+
govet:
62+
enable:
63+
- shadow
64+
exclusions:
65+
generated: lax
66+
presets:
67+
- comments
68+
- common-false-positives
69+
- legacy
70+
- std-error-handling
71+
rules:
72+
- linters:
73+
- revive
74+
text: increment-decrement
75+
paths:
76+
- third_party$
77+
- builtin$
78+
- examples$
3179
issues:
3280
max-issues-per-linter: 0
3381
max-same-issues: 0
34-
exclude-rules:
35-
- linters:
36-
- revive
37-
text: increment-decrement
38-
39-
linters-settings:
40-
govet:
41-
enable:
42-
- shadow
82+
formatters:
83+
enable:
84+
- gci
85+
- gofmt
86+
- gofumpt
87+
- goimports
88+
exclusions:
89+
generated: lax
90+
paths:
91+
- third_party$
92+
- builtin$
93+
- examples$

0 commit comments

Comments
 (0)