mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-21 22:57:15 +00:00
golangci-lint: temporarily suppress known issues in the code base
These suppressions are necessary to make golangci-lint 1.64 pass with the current code base. This change is meant to be backported to release branches. On master, we may want to revert some of it together with fixing the findings.
This commit is contained in:
committed by
Jordan Liggitt
parent
82de1cd025
commit
4c4ffeb022
@@ -69,6 +69,24 @@ issues:
|
||||
- ginkgolinter
|
||||
text: use a function call in (Eventually|Consistently)
|
||||
|
||||
# Some of these seem legitimate, maybe better fix code (https://github.com/kubernetes/kubernetes/issues/130449).
|
||||
|
||||
- linters:
|
||||
- govet
|
||||
text: "lostcancel|printf"
|
||||
|
||||
- linters:
|
||||
- ginkgolinter
|
||||
text: "wrong error assertion. Consider using `gomega.(Eventually|Consistently)|wrong comparison assertion|wrong length assertion"
|
||||
|
||||
- linters:
|
||||
- testifylint
|
||||
text: "encoded-compare|error-nil|formatter"
|
||||
|
||||
- linters:
|
||||
- gocritic
|
||||
text: "append result not assigned to the same slice|put a space between `//` and comment text|sloppyLen|elseif|should rewrite switch statement to if statement|regexpMust|wrapperFunc: use strings.ReplaceAll|singleCaseSwitch|deprecatedComment|exitAfterDefer|captLocal|unlambda|underef|unslice|valSwap|typeSwitchVar"
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507012435
|
||||
- linters:
|
||||
- gocritic
|
||||
|
||||
@@ -72,6 +72,27 @@ issues:
|
||||
- ginkgolinter
|
||||
text: use a function call in (Eventually|Consistently)
|
||||
|
||||
{{- if .Base}}
|
||||
|
||||
# Some of these seem legitimate, maybe better fix code (https://github.com/kubernetes/kubernetes/issues/130449).
|
||||
|
||||
- linters:
|
||||
- govet
|
||||
text: "lostcancel|printf"
|
||||
|
||||
- linters:
|
||||
- ginkgolinter
|
||||
text: "wrong error assertion. Consider using `gomega.(Eventually|Consistently)|wrong comparison assertion|wrong length assertion"
|
||||
|
||||
- linters:
|
||||
- testifylint
|
||||
text: "encoded-compare|error-nil|formatter"
|
||||
|
||||
- linters:
|
||||
- gocritic
|
||||
text: "append result not assigned to the same slice|put a space between `//` and comment text|sloppyLen|elseif|should rewrite switch statement to if statement|regexpMust|wrapperFunc: use strings.ReplaceAll|singleCaseSwitch|deprecatedComment|exitAfterDefer|captLocal|unlambda|underef|unslice|valSwap|typeSwitchVar"
|
||||
{{- end}}
|
||||
|
||||
# https://github.com/kubernetes/kubernetes/issues/117288#issuecomment-1507012435
|
||||
- linters:
|
||||
- gocritic
|
||||
|
||||
Reference in New Issue
Block a user