Skip to content

Commit 035ee1e

Browse files
committed
update golangci-lint (2.4.0); silence new errors
Some rules are disabled to silence the errors introduced in this release of golangci-lint. See PR 4490 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 9c59986 commit 035ee1e

File tree

4 files changed

+26
-5
lines changed

4 files changed

+26
-5
lines changed

.golangci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ linters:
9999
- name: use-errors-new
100100
# 84 occurrences. Improves error testing.
101101
disabled: true
102+
- name: struct-tag
103+
# 2 occurrences.
104+
disabled: true
102105

103106
##### P1: consider making a dent on these, but not critical.
104107
- name: argument-limit
@@ -131,6 +134,9 @@ linters:
131134
- name: cognitive-complexity
132135
arguments: [205]
133136
# 441 occurrences (at default 7). We should try to lower it (involves significant refactoring).
137+
- name: var-naming
138+
# 1 occurrence.
139+
disabled: true
134140

135141
##### P2: nice to have.
136142
- name: max-public-structs
@@ -155,6 +161,9 @@ linters:
155161
- name: exported
156162
# 577 occurrences. Forces documentation of any exported symbol.
157163
disabled: true
164+
- name: unnecessary-format
165+
# Many occurrences.
166+
disabled: true
158167

159168
###### Permanently disabled. Below have been reviewed and vetted to be unnecessary.
160169
- name: line-length-limit
@@ -175,6 +184,9 @@ linters:
175184
- name: add-constant
176185
# 2605 occurrences. Kind of useful in itself, but unacceptable amount of effort to fix
177186
disabled: true
187+
- name: enforce-switch-style
188+
# Many occurrences.
189+
disabled: true
178190

179191
depguard:
180192
rules:
@@ -241,7 +253,6 @@ linters:
241253
- typeAssertChain
242254
- unlabelStmt
243255
- builtinShadow
244-
- importShadow
245256
- initClause
246257
- nestingReduce
247258
- unnecessaryBlock

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,15 @@ fix-mod:
217217
##########################
218218
install-dev-tools:
219219
$(call title, $@)
220-
# golangci: v2.0.2 (2024-03-26)
220+
# golangci: v2.4.0 (2025-08-14)
221221
# git-validation: main (2025-02-25)
222222
# ltag: main (2025-03-04)
223223
# go-licenses: v2.0.0-alpha.1 (2024-06-27)
224224
# stubbing go-licenses with dependency upgrade due to non-compatibility with golang 1.25rc1
225225
# Issue: https://github.com/google/go-licenses/issues/312
226226
@cd $(MAKEFILE_DIR) \
227227
&& go install github.com/Shubhranshu153/go-licenses/v2@f8c503d1357dffb6c97ed3b94e912ab294dde24a \
228-
&& go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@2b224c2cf4c9f261c22a16af7f8ca6408467f338 \
228+
&& go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@43d03392d7dc3746fa776dbddd66dfcccff70651 \
229229
&& go install github.com/vbatts/git-validation@7b60e35b055dd2eab5844202ffffad51d9c93922 \
230230
&& go install github.com/containerd/ltag@66e6a514664ee2d11a470735519fa22b1a9eaabd \
231231
&& go install gotest.tools/gotestsum@0d9599e513d70e5792bb9334869f82f6e8b53d4d

mod/tigron/.golangci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ linters:
5454
- sloglint # no slog
5555
- testifylint # no testify
5656
- zerologlint # no zerolog
57+
- funcorder
58+
- noctx
59+
- noinlineerr
60+
- wsl_v5
5761
settings:
5862
interfacebloat:
5963
# Default is 10
@@ -91,6 +95,12 @@ linters:
9195
- "fmt.Fprint"
9296
- "fmt.Fprintln"
9397
- "fmt.Fprintf"
98+
- name: redundant-test-main-exit
99+
disabled: true
100+
- name: enforce-switch-style
101+
disabled: true
102+
- name: var-naming
103+
disabled: true
94104
depguard:
95105
rules:
96106
main:

mod/tigron/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,14 @@ up:
164164
##########################
165165
install-dev-tools:
166166
$(call title, $@)
167-
# golangci: v2.0.2 (2024-03-26)
167+
# golangci: v2.4.0 (2025-08-14)
168168
# git-validation: main (2025-02-25)
169169
# ltag: main (2025-03-04)
170170
# go-licenses: v2.0.0-alpha.1 (2024-06-27)
171171
# stubbing go-licenses with dependency upgrade due to non-compatibility with golang 1.25rc1
172172
# Issue: https://github.com/google/go-licenses/issues/312
173173
@cd $(MAKEFILE_DIR) \
174-
&& go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@2b224c2cf4c9f261c22a16af7f8ca6408467f338 \
174+
&& go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@43d03392d7dc3746fa776dbddd66dfcccff70651 \
175175
&& go install github.com/vbatts/git-validation@7b60e35b055dd2eab5844202ffffad51d9c93922 \
176176
&& go install github.com/containerd/ltag@66e6a514664ee2d11a470735519fa22b1a9eaabd \
177177
&& go install github.com/Shubhranshu153/go-licenses/v2@f8c503d1357dffb6c97ed3b94e912ab294dde24a

0 commit comments

Comments
 (0)