mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
hack: verify golangci-lint config, update text
This commit is contained in:
parent
834a0d92cf
commit
a9d558de26
@ -205,7 +205,7 @@ linters-settings: # please keep this alphabetized
|
||||
msg: should not be used because managedFields was removed
|
||||
- p: \.Add$
|
||||
pkg: ^k8s\.io/component-base/featuregate$
|
||||
msg: should not use MutableFeatureGate.Add, use AddVersioned instead
|
||||
msg: should not use Add, use AddVersioned instead
|
||||
- p: ^gomega\.BeTrue$
|
||||
pkg: ^github.com/onsi/gomega$
|
||||
msg: "it does not produce a good failure message - use BeTrueBecause with an explicit printf-style failure message instead, or plain Go: if ... { ginkgo.Fail(...) }"
|
||||
|
@ -271,7 +271,7 @@ linters-settings: # please keep this alphabetized
|
||||
msg: should not be used because managedFields was removed
|
||||
- p: \.Add$
|
||||
pkg: ^k8s\.io/component-base/featuregate$
|
||||
msg: should not use MutableFeatureGate.Add, use AddVersioned instead
|
||||
msg: should not use Add, use AddVersioned instead
|
||||
gocritic:
|
||||
enabled-checks:
|
||||
- equalFold
|
||||
|
@ -223,7 +223,7 @@ linters-settings: # please keep this alphabetized
|
||||
msg: should not be used because managedFields was removed
|
||||
- p: \.Add$
|
||||
pkg: ^k8s\.io/component-base/featuregate$
|
||||
msg: should not use MutableFeatureGate.Add, use AddVersioned instead
|
||||
msg: should not use Add, use AddVersioned instead
|
||||
{{- if .Hints}}
|
||||
- p: ^gomega\.BeTrue$
|
||||
pkg: ^github.com/onsi/gomega$
|
||||
|
@ -15,7 +15,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
# This script checks that all generated golangci-lint configurations
|
||||
# are up-to-date.
|
||||
# are up-to-date and the config hack/golangci.yaml is valid.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
@ -24,4 +24,9 @@ set -o pipefail
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||
source "${KUBE_ROOT}/hack/lib/verify-generated.sh"
|
||||
|
||||
golangci=("${GOBIN}/golangci-lint")
|
||||
golangci_config="${KUBE_ROOT}/hack/golangci.yaml"
|
||||
|
||||
kube::verify::generated "" "Please run 'hack/update-golangci-lint-config.sh'" hack/update-golangci-lint-config.sh
|
||||
|
||||
"${golangci[@]}" config verify --config="${golangci_config}"
|
||||
|
Loading…
Reference in New Issue
Block a user