mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-01-27 10:19:35 +00:00
golangci-lint: exclude naming convention check for swagger docs
This started to show up now as linter hints at the start of the 1.34 cycle in all PRs which modify the API. We don't want to enforce that convention in that generated code, so suppressing it.
This commit is contained in:
@@ -102,6 +102,12 @@ linters:
|
||||
- revive
|
||||
text: "(ST1003: should not use underscores in Go names; func ([cC]onvert_.*_To_.*|[sS]etDefaults_)|exported: exported function (Convert|SetDefaults)_.* should be of the form)"
|
||||
|
||||
# The generated swagger docs also don't follow the naming convention.
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: "ST1003: should not use underscores in Go names"
|
||||
path: types_swagger_doc_generated.go$
|
||||
|
||||
- path: (.+)\.go$
|
||||
# staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore
|
||||
text: ineffective break statement. Did you mean to break out of the outer loop
|
||||
|
||||
@@ -102,6 +102,12 @@ linters:
|
||||
- revive
|
||||
text: "(ST1003: should not use underscores in Go names; func ([cC]onvert_.*_To_.*|[sS]etDefaults_)|exported: exported function (Convert|SetDefaults)_.* should be of the form)"
|
||||
|
||||
# The generated swagger docs also don't follow the naming convention.
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: "ST1003: should not use underscores in Go names"
|
||||
path: types_swagger_doc_generated.go$
|
||||
|
||||
# TODO(https://github.com/kubernetes/kubernetes/issues/131475): Remove these excluded directories and fix findings. Due to large amount of findings in different components
|
||||
# with different owners it's hard to fix everything in a single pr. This will therefore be done in multiple prs.
|
||||
- path: (pkg/volume/*|test/*|azure/*|pkg/cmd/wait*|request/bearertoken/*|metrics/*|filters/*)
|
||||
|
||||
@@ -102,6 +102,12 @@ linters:
|
||||
- revive
|
||||
text: "(ST1003: should not use underscores in Go names; func ([cC]onvert_.*_To_.*|[sS]etDefaults_)|exported: exported function (Convert|SetDefaults)_.* should be of the form)"
|
||||
|
||||
# The generated swagger docs also don't follow the naming convention.
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: "ST1003: should not use underscores in Go names"
|
||||
path: types_swagger_doc_generated.go$
|
||||
|
||||
{{- if .Hints}}
|
||||
|
||||
- path: (.+)\.go$
|
||||
|
||||
Reference in New Issue
Block a user