Skip to content

Commit 2fb84cf

Browse files
authored
Merge pull request kubernetes#137052 from skitt/golangci-lint-2.9.0
Bump to golangci-lint 2.9.0
2 parents 31bf3ed + 3d1e90f commit 2fb84cf

File tree

4 files changed

+112
-112
lines changed

4 files changed

+112
-112
lines changed

hack/golangci.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ linters:
124124
- ginkgolinter
125125
text: "wrong error assertion. Consider using `gomega.(Eventually|Consistently)|wrong comparison assertion|wrong length assertion"
126126

127+
- linters:
128+
- ginkgolinter
129+
text: "Success matcher only support a single error value, or function with Gomega as its first parameter"
130+
127131
- linters:
128132
- gocritic
129133
text: "wrapperFunc: use strings.ReplaceAll|should rewrite switch statement to if statement"
@@ -560,12 +564,6 @@ linters:
560564
# consistency with existing code
561565
# and it's just syntactic sugar.
562566
- any
563-
# Replace for-range over b.N with b.Loop.
564-
#
565-
# Only a hint for new tests because there's
566-
# too much existing code that isn't worth
567-
# updating.
568-
- bloop
569567
# Replace []byte(fmt.Sprintf) with fmt.Appendf.
570568
#
571569
# A useful hint for new code, but
@@ -601,9 +599,13 @@ linters:
601599
- reflecttypefor
602600
# Replace loops with slices.Contains or slices.ContainsFunc.
603601
#
604-
# A useful hint because it can make code more obvious
602+
# A useful hint because it can make code more obvious
605603
# and/or avoid helper functions.
606604
- slicescontains
605+
# Replace strings.Index etc. with strings.Cut
606+
#
607+
# A useful hint because it can make code more obvious.
608+
- stringscut
607609
# Replace HasPrefix/TrimPrefix with CutPrefix.
608610
#
609611
# A useful hint because the code becomes shorter.

hack/golangci.yaml.in

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ linters:
139139
- ginkgolinter
140140
text: "wrong error assertion. Consider using `gomega.(Eventually|Consistently)|wrong comparison assertion|wrong length assertion"
141141

142+
- linters:
143+
- ginkgolinter
144+
text: "Success matcher only support a single error value, or function with Gomega as its first parameter"
145+
142146
- linters:
143147
- gocritic
144148
text: "wrapperFunc: use strings.ReplaceAll|should rewrite switch statement to if statement"
@@ -287,12 +291,6 @@ linters:
287291
# and it's just syntactic sugar.
288292
- any
289293
{{- if .Base }}
290-
# Replace for-range over b.N with b.Loop.
291-
#
292-
# Only a hint for new tests because there's
293-
# too much existing code that isn't worth
294-
# updating.
295-
- bloop
296294
# Replace []byte(fmt.Sprintf) with fmt.Appendf.
297295
#
298296
# A useful hint for new code, but
@@ -330,9 +328,13 @@ linters:
330328
- reflecttypefor
331329
# Replace loops with slices.Contains or slices.ContainsFunc.
332330
#
333-
# A useful hint because it can make code more obvious
331+
# A useful hint because it can make code more obvious
334332
# and/or avoid helper functions.
335333
- slicescontains
334+
# Replace strings.Index etc. with strings.Cut
335+
#
336+
# A useful hint because it can make code more obvious.
337+
- stringscut
336338
# Replace HasPrefix/TrimPrefix with CutPrefix.
337339
#
338340
# A useful hint because the code becomes shorter.

hack/tools/golangci-lint/go.mod

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ tool (
1010

1111
require (
1212
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
13-
golang.org/x/tools v0.39.0
13+
golang.org/x/tools v0.42.0
1414
)
1515

1616
require (
1717
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
1818
4d63.com/gochecknoglobals v0.2.2 // indirect
1919
codeberg.org/chavacava/garif v0.2.0 // indirect
20+
codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect
2021
dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect
2122
dev.gaijin.team/go/golib v0.6.0 // indirect
2223
github.com/4meepo/tagalign v1.4.3 // indirect
@@ -26,15 +27,15 @@ require (
2627
github.com/Antonboom/errname v1.1.1 // indirect
2728
github.com/Antonboom/nilnil v1.1.1 // indirect
2829
github.com/Antonboom/testifylint v1.6.4 // indirect
29-
github.com/BurntSushi/toml v1.5.0 // indirect
30+
github.com/BurntSushi/toml v1.6.0 // indirect
3031
github.com/Djarvur/go-err113 v0.1.1 // indirect
3132
github.com/Masterminds/semver/v3 v3.4.0 // indirect
32-
github.com/MirrexOne/unqueryvet v1.3.0 // indirect
33+
github.com/MirrexOne/unqueryvet v1.5.3 // indirect
3334
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
34-
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
35+
github.com/alecthomas/chroma/v2 v2.23.1 // indirect
3536
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
3637
github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
37-
github.com/alexkohler/prealloc v1.0.0 // indirect
38+
github.com/alexkohler/prealloc v1.0.2 // indirect
3839
github.com/alfatraining/structtag v1.0.0 // indirect
3940
github.com/alingse/asasalint v0.0.11 // indirect
4041
github.com/alingse/nilnesserr v0.2.0 // indirect
@@ -45,7 +46,7 @@ require (
4546
github.com/bkielbasa/cyclop v1.2.3 // indirect
4647
github.com/blizzy78/varnamelen v0.8.0 // indirect
4748
github.com/bombsimon/wsl/v4 v4.7.0 // indirect
48-
github.com/bombsimon/wsl/v5 v5.3.0 // indirect
49+
github.com/bombsimon/wsl/v5 v5.6.0 // indirect
4950
github.com/breml/bidichk v0.3.3 // indirect
5051
github.com/breml/errchkjson v0.4.1 // indirect
5152
github.com/butuzov/ireturn v0.4.0 // indirect
@@ -56,7 +57,7 @@ require (
5657
github.com/charithe/durationcheck v0.0.11 // indirect
5758
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
5859
github.com/charmbracelet/lipgloss v1.1.0 // indirect
59-
github.com/charmbracelet/x/ansi v0.8.0 // indirect
60+
github.com/charmbracelet/x/ansi v0.10.1 // indirect
6061
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
6162
github.com/charmbracelet/x/term v0.2.1 // indirect
6263
github.com/ckaznocha/intrange v0.3.1 // indirect
@@ -72,28 +73,28 @@ require (
7273
github.com/firefart/nonamedreturns v1.0.6 // indirect
7374
github.com/fsnotify/fsnotify v1.5.4 // indirect
7475
github.com/fzipp/gocyclo v0.6.0 // indirect
75-
github.com/ghostiam/protogetter v0.3.17 // indirect
76-
github.com/go-critic/go-critic v0.14.2 // indirect
76+
github.com/ghostiam/protogetter v0.3.20 // indirect
77+
github.com/go-critic/go-critic v0.14.3 // indirect
7778
github.com/go-toolsmith/astcast v1.1.0 // indirect
7879
github.com/go-toolsmith/astcopy v1.1.0 // indirect
7980
github.com/go-toolsmith/astequal v1.2.0 // indirect
8081
github.com/go-toolsmith/astfmt v1.1.0 // indirect
8182
github.com/go-toolsmith/astp v1.1.0 // indirect
8283
github.com/go-toolsmith/strparse v1.1.0 // indirect
8384
github.com/go-toolsmith/typep v1.1.0 // indirect
84-
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
85+
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
8586
github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect
8687
github.com/gobwas/glob v0.2.3 // indirect
87-
github.com/godoc-lint/godoc-lint v0.10.2 // indirect
88+
github.com/godoc-lint/godoc-lint v0.11.1 // indirect
8889
github.com/gofrs/flock v0.13.0 // indirect
8990
github.com/golang/protobuf v1.5.4 // indirect
9091
github.com/golangci/asciicheck v0.5.0 // indirect
9192
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
9293
github.com/golangci/go-printf-func-name v0.1.1 // indirect
9394
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
94-
github.com/golangci/golangci-lint/v2 v2.7.1 // indirect
95-
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
96-
github.com/golangci/misspell v0.7.0 // indirect
95+
github.com/golangci/golangci-lint/v2 v2.9.0 // indirect
96+
github.com/golangci/golines v0.15.0 // indirect
97+
github.com/golangci/misspell v0.8.0 // indirect
9798
github.com/golangci/plugin-module-register v0.1.2 // indirect
9899
github.com/golangci/revgrep v0.8.0 // indirect
99100
github.com/golangci/swaggoswag v0.0.0-20250504205917-77f2aca3143e // indirect
@@ -121,8 +122,9 @@ require (
121122
github.com/kunwardeep/paralleltest v1.0.15 // indirect
122123
github.com/lasiar/canonicalheader v1.1.2 // indirect
123124
github.com/ldez/exptostd v0.4.5 // indirect
124-
github.com/ldez/gomoddirectives v0.7.1 // indirect
125+
github.com/ldez/gomoddirectives v0.8.0 // indirect
125126
github.com/ldez/grignotin v0.10.1 // indirect
127+
github.com/ldez/structtags v0.6.1 // indirect
126128
github.com/ldez/tagliatelle v0.7.2 // indirect
127129
github.com/ldez/usetesting v0.5.0 // indirect
128130
github.com/leonklingele/grouper v1.1.2 // indirect
@@ -138,18 +140,17 @@ require (
138140
github.com/mattn/go-isatty v0.0.20 // indirect
139141
github.com/mattn/go-runewidth v0.0.16 // indirect
140142
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
141-
github.com/mgechev/revive v1.13.0 // indirect
143+
github.com/mgechev/revive v1.14.0 // indirect
142144
github.com/mitchellh/go-homedir v1.1.0 // indirect
143145
github.com/mitchellh/mapstructure v1.5.0 // indirect
144146
github.com/moricho/tparallel v0.3.2 // indirect
145147
github.com/muesli/termenv v0.16.0 // indirect
146148
github.com/nakabonne/nestif v0.3.1 // indirect
147149
github.com/nishanths/exhaustive v0.12.0 // indirect
148150
github.com/nishanths/predeclared v0.2.2 // indirect
149-
github.com/nunnatsa/ginkgolinter v0.21.2 // indirect
151+
github.com/nunnatsa/ginkgolinter v0.22.0 // indirect
150152
github.com/pelletier/go-toml v1.9.5 // indirect
151153
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
152-
github.com/polyfloyd/go-errorlint v1.8.0 // indirect
153154
github.com/prometheus/client_golang v1.12.1 // indirect
154155
github.com/prometheus/client_model v0.2.0 // indirect
155156
github.com/prometheus/common v0.32.1 // indirect
@@ -168,14 +169,14 @@ require (
168169
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
169170
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
170171
github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect
171-
github.com/securego/gosec/v2 v2.22.10 // indirect
172-
github.com/sirupsen/logrus v1.9.3 // indirect
172+
github.com/securego/gosec/v2 v2.22.11 // indirect
173+
github.com/sirupsen/logrus v1.9.4 // indirect
173174
github.com/sivchari/containedctx v1.0.3 // indirect
174175
github.com/sonatard/noctx v0.4.0 // indirect
175176
github.com/sourcegraph/go-diff v0.7.0 // indirect
176177
github.com/spf13/afero v1.15.0 // indirect
177178
github.com/spf13/cast v1.5.0 // indirect
178-
github.com/spf13/cobra v1.10.1 // indirect
179+
github.com/spf13/cobra v1.10.2 // indirect
179180
github.com/spf13/jwalterweatherman v1.1.0 // indirect
180181
github.com/spf13/pflag v1.0.10 // indirect
181182
github.com/spf13/viper v1.12.0 // indirect
@@ -201,17 +202,17 @@ require (
201202
gitlab.com/bosi/decorder v0.4.2 // indirect
202203
go-simpler.org/musttag v0.14.0 // indirect
203204
go-simpler.org/sloglint v0.11.1 // indirect
204-
go.augendre.info/arangolint v0.3.1 // indirect
205+
go.augendre.info/arangolint v0.4.0 // indirect
205206
go.augendre.info/fatcontext v0.9.0 // indirect
206-
go.uber.org/automaxprocs v1.6.0 // indirect
207207
go.uber.org/multierr v1.10.0 // indirect
208208
go.uber.org/zap v1.27.0 // indirect
209-
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
210-
golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect
211-
golang.org/x/mod v0.30.0 // indirect
212-
golang.org/x/sync v0.18.0 // indirect
213-
golang.org/x/sys v0.38.0 // indirect
214-
golang.org/x/text v0.30.0 // indirect
209+
go.yaml.in/yaml/v3 v3.0.4 // indirect
210+
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect
211+
golang.org/x/exp/typeparams v0.0.0-20251125195548-87e1e737ad39 // indirect
212+
golang.org/x/mod v0.33.0 // indirect
213+
golang.org/x/sync v0.19.0 // indirect
214+
golang.org/x/sys v0.41.0 // indirect
215+
golang.org/x/text v0.33.0 // indirect
215216
google.golang.org/protobuf v1.36.8 // indirect
216217
gopkg.in/ini.v1 v1.67.0 // indirect
217218
gopkg.in/yaml.v2 v2.4.0 // indirect

0 commit comments

Comments
 (0)