Skip to content

Commit 346bffb

Browse files
tylerauerbeckdivyansh42
authored andcommitted
cleanup: update golangci-lint to v2
Signed-off-by: Tyler Auerbeck <tylerauerbeck@users.noreply.github.com>
1 parent 2eddf32 commit 346bffb

File tree

5 files changed

+239
-183
lines changed

5 files changed

+239
-183
lines changed

.golangci.yml

Lines changed: 47 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,52 @@
1-
issues:
2-
exclude-rules:
3-
# Exclude some linters from running on tests files.
4-
# temporarily disabling G602 due to https://github.com/securego/gosec/issues/1005
5-
- path: _test\.go
6-
linters:
7-
- gosec
8-
exclude-dirs:
9-
- vendor
1+
version: "2"
102
run:
11-
issues-exit-code: 1
123
build-tags:
134
- e2e
14-
linters-settings:
15-
errcheck:
16-
exclude-functions:
17-
- (*github.com/tektoncd/pipeline/vendor/go.uber.org/zap.SugaredLogger).Sync
18-
- flag.Set
19-
- os.Setenv
20-
- logger.Sync
21-
- fmt.Fprintf
22-
- fmt.Fprintln
23-
- (io.Closer).Close
24-
- updateConfigMap
25-
staticcheck:
26-
checks:
27-
- '-SA1019' # ignore ClusterTask warning
5+
issues-exit-code: 1
286
linters:
297
enable:
30-
- errcheck
31-
- gofmt
32-
- goimports
33-
- gosec
34-
- gocritic
35-
- revive
36-
- misspell
37-
- unused
8+
- gocritic
9+
- gosec
10+
- misspell
11+
- revive
12+
settings:
13+
errcheck:
14+
exclude-functions:
15+
- (*github.com/tektoncd/pipeline/vendor/go.uber.org/zap.SugaredLogger).Sync
16+
- flag.Set
17+
- os.Setenv
18+
- logger.Sync
19+
- fmt.Fprintf
20+
- fmt.Fprintln
21+
- (io.Closer).Close
22+
- updateConfigMap
23+
staticcheck:
24+
checks:
25+
- -SA1019
26+
exclusions:
27+
generated: lax
28+
presets:
29+
- comments
30+
- common-false-positives
31+
- legacy
32+
- std-error-handling
33+
rules:
34+
- linters:
35+
- gosec
36+
path: _test\.go
37+
paths:
38+
- vendor
39+
- third_party$
40+
- builtin$
41+
- examples$
42+
formatters:
43+
enable:
44+
- gofmt
45+
- goimports
46+
exclusions:
47+
generated: lax
48+
paths:
49+
- vendor
50+
- third_party$
51+
- builtin$
52+
- examples$

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ lint: lint-go goimports lint-yaml ## run all linters
9797

9898
GOLANGCILINT = $(BIN)/golangci-lint
9999
$(BIN)/golangci-lint: ; $(info $(M) getting golangci-lint $(GOLANGCI_VERSION))
100-
cd tools; GOBIN=$(BIN) $(GO) install -mod=mod github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_VERSION)
100+
cd tools; GOBIN=$(BIN) $(GO) install -mod=mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_VERSION)
101101

102102
.PHONY: lint-go
103103
lint-go: | $(GOLANGCILINT) ; $(info $(M) running golangci-lint…) @ ## Run golangci-lint

tools/go.mod

Lines changed: 60 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,55 +2,63 @@ module github.com/tektoncd/cli/tools
22

33
go 1.23.4
44

5-
require github.com/golangci/golangci-lint v1.64.8
5+
require github.com/golangci/golangci-lint/v2 v2.1.6
66

77
require (
88
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
99
4d63.com/gochecknoglobals v0.2.2 // indirect
1010
github.com/4meepo/tagalign v1.4.2 // indirect
1111
github.com/Abirdcfly/dupword v0.1.3 // indirect
12-
github.com/Antonboom/errname v1.0.0 // indirect
13-
github.com/Antonboom/nilnil v1.0.1 // indirect
14-
github.com/Antonboom/testifylint v1.5.2 // indirect
15-
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
16-
github.com/Crocmagnon/fatcontext v0.7.1 // indirect
12+
github.com/Antonboom/errname v1.1.0 // indirect
13+
github.com/Antonboom/nilnil v1.1.0 // indirect
14+
github.com/Antonboom/testifylint v1.6.1 // indirect
15+
github.com/BurntSushi/toml v1.5.0 // indirect
1716
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
1817
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.1 // indirect
19-
github.com/Masterminds/semver/v3 v3.3.0 // indirect
18+
github.com/Masterminds/semver/v3 v3.3.1 // indirect
2019
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
20+
github.com/alecthomas/chroma/v2 v2.17.2 // indirect
2121
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
22-
github.com/alexkohler/nakedret/v2 v2.0.5 // indirect
22+
github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
2323
github.com/alexkohler/prealloc v1.0.0 // indirect
2424
github.com/alingse/asasalint v0.0.11 // indirect
25-
github.com/alingse/nilnesserr v0.1.2 // indirect
25+
github.com/alingse/nilnesserr v0.2.0 // indirect
2626
github.com/ashanbrown/forbidigo v1.6.0 // indirect
2727
github.com/ashanbrown/makezero v1.2.0 // indirect
28+
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
2829
github.com/beorn7/perks v1.0.1 // indirect
2930
github.com/bkielbasa/cyclop v1.2.3 // indirect
3031
github.com/blizzy78/varnamelen v0.8.0 // indirect
31-
github.com/bombsimon/wsl/v4 v4.5.0 // indirect
32-
github.com/breml/bidichk v0.3.2 // indirect
33-
github.com/breml/errchkjson v0.4.0 // indirect
34-
github.com/butuzov/ireturn v0.3.1 // indirect
32+
github.com/bombsimon/wsl/v4 v4.7.0 // indirect
33+
github.com/breml/bidichk v0.3.3 // indirect
34+
github.com/breml/errchkjson v0.4.1 // indirect
35+
github.com/butuzov/ireturn v0.4.0 // indirect
3536
github.com/butuzov/mirror v1.3.0 // indirect
36-
github.com/catenacyber/perfsprint v0.8.2 // indirect
37+
github.com/catenacyber/perfsprint v0.9.1 // indirect
3738
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
3839
github.com/cespare/xxhash/v2 v2.3.0 // indirect
3940
github.com/charithe/durationcheck v0.0.10 // indirect
41+
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
42+
github.com/charmbracelet/lipgloss v1.1.0 // indirect
43+
github.com/charmbracelet/x/ansi v0.8.0 // indirect
44+
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
45+
github.com/charmbracelet/x/term v0.2.1 // indirect
4046
github.com/chavacava/garif v0.1.0 // indirect
41-
github.com/ckaznocha/intrange v0.3.0 // indirect
47+
github.com/ckaznocha/intrange v0.3.1 // indirect
4248
github.com/curioswitch/go-reassign v0.3.0 // indirect
43-
github.com/daixiang0/gci v0.13.5 // indirect
49+
github.com/daixiang0/gci v0.13.6 // indirect
50+
github.com/dave/dst v0.27.3 // indirect
4451
github.com/davecgh/go-spew v1.1.1 // indirect
4552
github.com/denis-tingaikin/go-header v0.5.0 // indirect
53+
github.com/dlclark/regexp2 v1.11.5 // indirect
4654
github.com/ettle/strcase v0.2.0 // indirect
4755
github.com/fatih/color v1.18.0 // indirect
4856
github.com/fatih/structtag v1.2.0 // indirect
49-
github.com/firefart/nonamedreturns v1.0.5 // indirect
57+
github.com/firefart/nonamedreturns v1.0.6 // indirect
5058
github.com/fsnotify/fsnotify v1.5.4 // indirect
5159
github.com/fzipp/gocyclo v0.6.0 // indirect
52-
github.com/ghostiam/protogetter v0.3.9 // indirect
53-
github.com/go-critic/go-critic v0.12.0 // indirect
60+
github.com/ghostiam/protogetter v0.3.15 // indirect
61+
github.com/go-critic/go-critic v0.13.0 // indirect
5462
github.com/go-toolsmith/astcast v1.1.0 // indirect
5563
github.com/go-toolsmith/astcopy v1.1.0 // indirect
5664
github.com/go-toolsmith/astequal v1.2.0 // indirect
@@ -66,10 +74,11 @@ require (
6674
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
6775
github.com/golangci/go-printf-func-name v0.1.0 // indirect
6876
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
77+
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
6978
github.com/golangci/misspell v0.6.0 // indirect
7079
github.com/golangci/plugin-module-register v0.1.1 // indirect
7180
github.com/golangci/revgrep v0.8.0 // indirect
72-
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
81+
github.com/golangci/unconvert v0.0.0-20250410112200-a129a6e6413e // indirect
7382
github.com/google/go-cmp v0.7.0 // indirect
7483
github.com/gordonklaus/ineffassign v0.1.0 // indirect
7584
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
@@ -82,69 +91,71 @@ require (
8291
github.com/hashicorp/hcl v1.0.0 // indirect
8392
github.com/hexops/gotextdiff v1.0.3 // indirect
8493
github.com/inconshreveable/mousetrap v1.1.0 // indirect
85-
github.com/jgautheron/goconst v1.7.1 // indirect
94+
github.com/jgautheron/goconst v1.8.1 // indirect
8695
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
8796
github.com/jjti/go-spancheck v0.6.4 // indirect
8897
github.com/julz/importas v0.2.0 // indirect
8998
github.com/karamaru-alpha/copyloopvar v1.2.1 // indirect
9099
github.com/kisielk/errcheck v1.9.0 // indirect
91100
github.com/kkHAIKE/contextcheck v1.1.6 // indirect
92101
github.com/kulti/thelper v0.6.3 // indirect
93-
github.com/kunwardeep/paralleltest v1.0.10 // indirect
102+
github.com/kunwardeep/paralleltest v1.0.14 // indirect
94103
github.com/lasiar/canonicalheader v1.1.2 // indirect
95-
github.com/ldez/exptostd v0.4.2 // indirect
104+
github.com/ldez/exptostd v0.4.3 // indirect
96105
github.com/ldez/gomoddirectives v0.6.1 // indirect
97106
github.com/ldez/grignotin v0.9.0 // indirect
98107
github.com/ldez/tagliatelle v0.7.1 // indirect
99-
github.com/ldez/usetesting v0.4.2 // indirect
108+
github.com/ldez/usetesting v0.4.3 // indirect
100109
github.com/leonklingele/grouper v1.1.2 // indirect
101-
github.com/macabu/inamedparam v0.1.3 // indirect
110+
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
111+
github.com/macabu/inamedparam v0.2.0 // indirect
102112
github.com/magiconair/properties v1.8.6 // indirect
113+
github.com/manuelarte/funcorder v0.2.1 // indirect
103114
github.com/maratori/testableexamples v1.0.0 // indirect
104115
github.com/maratori/testpackage v1.1.1 // indirect
105116
github.com/matoous/godox v1.1.0 // indirect
106117
github.com/mattn/go-colorable v0.1.14 // indirect
107118
github.com/mattn/go-isatty v0.0.20 // indirect
108119
github.com/mattn/go-runewidth v0.0.16 // indirect
109120
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
110-
github.com/mgechev/revive v1.7.0 // indirect
121+
github.com/mgechev/revive v1.9.0 // indirect
111122
github.com/mitchellh/go-homedir v1.1.0 // indirect
112123
github.com/mitchellh/mapstructure v1.5.0 // indirect
113124
github.com/moricho/tparallel v0.3.2 // indirect
125+
github.com/muesli/termenv v0.16.0 // indirect
114126
github.com/nakabonne/nestif v0.3.1 // indirect
115127
github.com/nishanths/exhaustive v0.12.0 // indirect
116128
github.com/nishanths/predeclared v0.2.2 // indirect
117129
github.com/nunnatsa/ginkgolinter v0.19.1 // indirect
118130
github.com/olekukonko/tablewriter v0.0.5 // indirect
119131
github.com/pelletier/go-toml v1.9.5 // indirect
120-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
132+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
121133
github.com/pmezard/go-difflib v1.0.0 // indirect
122-
github.com/polyfloyd/go-errorlint v1.7.1 // indirect
134+
github.com/polyfloyd/go-errorlint v1.8.0 // indirect
123135
github.com/prometheus/client_golang v1.12.1 // indirect
124136
github.com/prometheus/client_model v0.2.0 // indirect
125137
github.com/prometheus/common v0.32.1 // indirect
126138
github.com/prometheus/procfs v0.7.3 // indirect
127-
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect
139+
github.com/quasilyte/go-ruleguard v0.4.4 // indirect
128140
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
129141
github.com/quasilyte/gogrep v0.5.0 // indirect
130142
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
131143
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
132144
github.com/raeperd/recvcheck v0.2.0 // indirect
133145
github.com/rivo/uniseg v0.4.7 // indirect
134146
github.com/rogpeppe/go-internal v1.14.1 // indirect
135-
github.com/ryancurrah/gomodguard v1.3.5 // indirect
147+
github.com/ryancurrah/gomodguard v1.4.1 // indirect
136148
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
137149
github.com/sanposhiho/wastedassign/v2 v2.1.0 // indirect
138150
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 // indirect
139151
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
140152
github.com/sashamelentyev/usestdlibvars v1.28.0 // indirect
141-
github.com/securego/gosec/v2 v2.22.2 // indirect
153+
github.com/securego/gosec/v2 v2.22.3 // indirect
142154
github.com/sirupsen/logrus v1.9.3 // indirect
143155
github.com/sivchari/containedctx v1.0.3 // indirect
144-
github.com/sivchari/tenv v1.12.1 // indirect
145156
github.com/sonatard/noctx v0.1.0 // indirect
146157
github.com/sourcegraph/go-diff v0.7.0 // indirect
147-
github.com/spf13/afero v1.12.0 // indirect
158+
github.com/spf13/afero v1.14.0 // indirect
148159
github.com/spf13/cast v1.5.0 // indirect
149160
github.com/spf13/cobra v1.9.1 // indirect
150161
github.com/spf13/jwalterweatherman v1.1.0 // indirect
@@ -156,37 +167,39 @@ require (
156167
github.com/stretchr/testify v1.10.0 // indirect
157168
github.com/subosito/gotenv v1.4.1 // indirect
158169
github.com/tdakkota/asciicheck v0.4.1 // indirect
159-
github.com/tetafro/godot v1.5.0 // indirect
160-
github.com/timakin/bodyclose v0.0.0-20241017074812-ed6a65f985e3 // indirect
161-
github.com/timonwong/loggercheck v0.10.1 // indirect
162-
github.com/tomarrell/wrapcheck/v2 v2.10.0 // indirect
170+
github.com/tetafro/godot v1.5.1 // indirect
171+
github.com/timakin/bodyclose v0.0.0-20241222091800-1db5c5ca4d67 // indirect
172+
github.com/timonwong/loggercheck v0.11.0 // indirect
173+
github.com/tomarrell/wrapcheck/v2 v2.11.0 // indirect
163174
github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect
164175
github.com/ultraware/funlen v0.2.0 // indirect
165176
github.com/ultraware/whitespace v0.2.0 // indirect
166177
github.com/uudashr/gocognit v1.2.0 // indirect
167178
github.com/uudashr/iface v1.3.1 // indirect
168-
github.com/xen0n/gosmopolitan v1.2.2 // indirect
179+
github.com/xen0n/gosmopolitan v1.3.0 // indirect
180+
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
169181
github.com/yagipy/maintidx v1.0.0 // indirect
170182
github.com/yeya24/promlinter v0.3.0 // indirect
171183
github.com/ykadowak/zerologlint v0.1.5 // indirect
172184
gitlab.com/bosi/decorder v0.4.2 // indirect
173-
go-simpler.org/musttag v0.13.0 // indirect
174-
go-simpler.org/sloglint v0.9.0 // indirect
185+
go-simpler.org/musttag v0.13.1 // indirect
186+
go-simpler.org/sloglint v0.11.0 // indirect
187+
go.augendre.info/fatcontext v0.8.0 // indirect
175188
go.uber.org/atomic v1.7.0 // indirect
176189
go.uber.org/automaxprocs v1.6.0 // indirect
177190
go.uber.org/multierr v1.6.0 // indirect
178191
go.uber.org/zap v1.24.0 // indirect
179192
golang.org/x/exp/typeparams v0.0.0-20250210185358-939b2ce775ac // indirect
180193
golang.org/x/mod v0.24.0 // indirect
181-
golang.org/x/sync v0.12.0 // indirect
182-
golang.org/x/sys v0.31.0 // indirect
183-
golang.org/x/text v0.22.0 // indirect
184-
golang.org/x/tools v0.31.0 // indirect
185-
google.golang.org/protobuf v1.36.5 // indirect
194+
golang.org/x/sync v0.13.0 // indirect
195+
golang.org/x/sys v0.32.0 // indirect
196+
golang.org/x/text v0.24.0 // indirect
197+
golang.org/x/tools v0.32.0 // indirect
198+
google.golang.org/protobuf v1.36.6 // indirect
186199
gopkg.in/ini.v1 v1.67.0 // indirect
187200
gopkg.in/yaml.v2 v2.4.0 // indirect
188201
gopkg.in/yaml.v3 v3.0.1 // indirect
189202
honnef.co/go/tools v0.6.1 // indirect
190-
mvdan.cc/gofumpt v0.7.0 // indirect
191-
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect
203+
mvdan.cc/gofumpt v0.8.0 // indirect
204+
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
192205
)

0 commit comments

Comments
 (0)