Skip to content

Commit ef32854

Browse files
committed
Use golangci-lint v2
1 parent e4ac2a2 commit ef32854

File tree

2 files changed

+43
-26
lines changed

2 files changed

+43
-26
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
cache: false
1414
- run: make check
1515
env: { SKIP_LINT: true }
16-
- uses: golangci/golangci-lint-action@v6
16+
- uses: golangci/golangci-lint-action@v7
1717
with: { version: "latest" }
1818
- run: make cov
1919
- uses: codecov/codecov-action@v5

.golangci.yml

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,58 @@
1-
run: { timeout: 3m }
2-
3-
linters-settings:
4-
cyclop:
5-
max-complexity: 15
6-
package-average: 0.5
7-
skip-tests: false
8-
9-
govet: { enable-all: true }
10-
11-
misspell: { locale: US }
12-
13-
depguard:
14-
rules:
15-
main: { allow: ["$gostd", "github.com/BooleanCat/go-functional/v2"] }
16-
1+
version: "2"
172
linters:
18-
disable-all: true
3+
default: none
194
enable:
20-
- errcheck
21-
- gosimple
22-
- govet
23-
- ineffassign
24-
- staticcheck
25-
- unused
265
- asasalint
276
- asciicheck
287
- bidichk
298
- decorder
309
- depguard
3110
- durationcheck
11+
- errcheck
3212
- errchkjson
3313
- errorlint
3414
- exhaustive
3515
- gochecknoglobals
3616
- gocritic
17+
- gocyclo
3718
- gosec
19+
- govet
20+
- ineffassign
21+
- misspell
3822
- nilerr
23+
- staticcheck
24+
- unused
25+
settings:
26+
cyclop:
27+
max-complexity: 15
28+
package-average: 0.5
29+
depguard:
30+
rules:
31+
main:
32+
allow:
33+
- $gostd
34+
- github.com/BooleanCat/go-functional/v2
35+
govet:
36+
enable-all: true
37+
misspell:
38+
locale: US
39+
exclusions:
40+
generated: lax
41+
presets:
42+
- comments
43+
- common-false-positives
44+
- legacy
45+
- std-error-handling
46+
paths:
47+
- third_party$
48+
- builtin$
49+
- examples$
50+
formatters:
51+
enable:
3952
- gofmt
40-
- gocyclo
41-
- misspell
53+
exclusions:
54+
generated: lax
55+
paths:
56+
- third_party$
57+
- builtin$
58+
- examples$

0 commit comments

Comments
 (0)