Skip to content

Commit da662cb

Browse files
ci: upgrade golangci-lint to v2.5.0 for Go 1.25 compatibility
1 parent 5d3ad49 commit da662cb

2 files changed

Lines changed: 70 additions & 60 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
go install gotest.tools/gotestsum@latest
2626
2727
- name: Install golangci-lint
28-
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
28+
uses: golangci/golangci-lint-action@25e2cdc5eb1d7a04fdc45ff538f1a00e960ae128 # v8.0.0
2929
with:
30-
version: v1.64.4
30+
version: v2.5.0
3131

3232
- name: Run tests with gotestsum
3333
run: |

.golangci.yml

Lines changed: 68 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,74 @@
1-
project_name: ld-find-code-refs
2-
1+
version: "2"
32
run:
4-
deadline: 120s
53
tests: false
6-
74
linters:
8-
enable-all: true
5+
default: all
96
disable:
10-
- golint
11-
- stylecheck
12-
- gochecknoglobals
13-
- lll
14-
- errcheck
15-
- interfacer
16-
- tagliatelle
17-
- varnamelen
18-
- nonamedreturns
19-
- nlreturn # re-enable this after fixing all cases
20-
- gomnd # re-enable this after fixing all cases
21-
- nosnakecase
22-
- ifshort # re-enable
23-
- nilerr #re-enable
24-
- goerr113
25-
- exhaustivestruct
26-
- exhaustruct
27-
- exhaustive
28-
- godot
29-
- wsl #fix
30-
- gocognit
31-
- revive
32-
- errname
33-
- cyclop
34-
- gofumpt # fix
35-
- gci
36-
- nestif # fix
37-
- gosec
38-
- gocritic
39-
- depguard
40-
- tagalign
41-
- nilnil
42-
fast: false
43-
44-
linter-settings:
45-
goimports:
46-
local-prefixes: github.com/launchdarkly,gopkg.in/launchdarkly
47-
7+
- cyclop
8+
- depguard
9+
- err113
10+
- errcheck
11+
- errname
12+
- exhaustive
13+
- exhaustruct
14+
- funcorder
15+
- gochecknoglobals
16+
- gocognit
17+
- gocritic
18+
- godoclint
19+
- godot
20+
- gosec
21+
- lll
22+
- mnd
23+
- nestif
24+
- nilerr
25+
- nilnil
26+
- nlreturn
27+
- noinlineerr
28+
- nonamedreturns
29+
- revive
30+
- tagalign
31+
- tagliatelle
32+
- varnamelen
33+
- wsl
34+
- wsl_v5
35+
settings:
36+
staticcheck:
37+
checks:
38+
- all
39+
- -ST1*
40+
- -QF1*
41+
exclusions:
42+
generated: lax
43+
rules:
44+
- linters:
45+
- staticcheck
46+
text: SA5011
47+
- path: (.+)\.go$
48+
text: error returned from external package is unwrapped
49+
- path: (.+)\.go$
50+
text: error returned from interface method should be wrapped
51+
- path: (.+)\.go$
52+
text: comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error
53+
- path: (.+)\.go$
54+
text: comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error
55+
- path: (.+)\.go$
56+
text: non-wrapping format verb for fmt.Errorf. Use `%w` to format errors
57+
- path: (.+)\.go$
58+
text: append to slice `projectKeys` with non-zero initialized length
59+
paths:
60+
- third_party$
61+
- builtin$
62+
- examples$
4863
issues:
49-
exclude:
50-
- "error returned from external package is unwrapped"
51-
- "error returned from interface method should be wrapped"
52-
- "comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error" # should fix
53-
- "comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error" # should fix
54-
- "non-wrapping format verb for fmt.Errorf. Use `%w` to format errors" # should fix
55-
- "append to slice `projectKeys` with non-zero initialized length"
56-
exclude-rules:
57-
# Exclude some `staticcheck` messages.
58-
- linters:
59-
- staticcheck
60-
text: "SA5011" # fix
61-
62-
exclude-use-default: false
6364
max-same-issues: 1000
64-
max-per-linter: 1000
65+
formatters:
66+
enable:
67+
- gofmt
68+
- goimports
69+
exclusions:
70+
generated: lax
71+
paths:
72+
- third_party$
73+
- builtin$
74+
- examples$

0 commit comments

Comments
 (0)