You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .golangci.yml
+26-2
Original file line number
Diff line number
Diff line change
@@ -247,25 +247,31 @@ linters:
247
247
- linters:
248
248
- staticcheck
249
249
text: 'SA1019: (mhc|m)(.Spec.MaxUnhealthy|.Spec.UnhealthyRange) is deprecated'
250
-
# v1Beta1 deprecated fields
250
+
# Specific exclude rules for deprecated packages that are still part of the codebase. These
251
+
# should be removed as the referenced deprecated packages are removed from the project.
251
252
- linters:
252
253
- staticcheck
253
254
text: 'SA1019: .* is deprecated: This package will be removed in one of the next releases.'
255
+
# Specific exclude rules for deprecated types that are still part of the codebase. These
256
+
# should be removed as the referenced deprecated types are removed from the project.
254
257
- linters:
255
258
- staticcheck
256
259
text: 'SA1019: (clusterv1alpha3.*|clusterv1alpha4.*) is deprecated: This type will be removed in one of the next releases.'
260
+
# Specific exclude rules for deprecated feature flags
257
261
- linters:
258
262
- staticcheck
259
263
text: 'SA1019: feature.ClusterResourceSet is deprecated: ClusterResourceSet feature is now GA and the corresponding feature flag will be removed in 1.12 release.'
264
+
# v1Beta1 deprecated fields
260
265
- linters:
261
266
- staticcheck
262
-
text: 'SA1019: .* is deprecated: This field is deprecated and is going to be removed when support for v1beta1 will be dropped.'
267
+
text: 'SA1019: .*\.Deprecated\.V1Beta1.* is deprecated'
263
268
- linters:
264
269
- revive
265
270
text: 'exported: exported method .*\.(Reconcile|SetupWithManager|SetupWebhookWithManager) should have comment or be unexported'
266
271
- linters:
267
272
- errcheck
268
273
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
274
+
# Exclude some packages or code to require comments, for example test code, or fake clients.
269
275
- linters:
270
276
- revive
271
277
text: exported (method|function|type|const) (.+) should have comment or be unexported
@@ -282,9 +288,13 @@ linters:
282
288
- revive
283
289
path: (framework|e2e)/.*.go
284
290
text: exported (method|function|type|const) (.+) should have comment or be unexported
291
+
# Disable unparam "always receives" which might not be really
292
+
# useful when building libraries.
285
293
- linters:
286
294
- unparam
287
295
text: always receives
296
+
# Dot imports for gomega and ginkgo are allowed
297
+
# within test files and test utils.
288
298
- linters:
289
299
- revive
290
300
- staticcheck
@@ -295,32 +305,44 @@ linters:
295
305
- staticcheck
296
306
path: (framework|e2e)/.*.go
297
307
text: should not use dot imports
308
+
# Large parts of this file are duplicate from k/k. Let's ignore "emptyStringTest" to reduce the noise in diffs
309
+
# and to avoid making mistakes by diverging from upstream just because of this purely stylistic linter finding.
0 commit comments