diff --git a/.golangci.yml b/.golangci.yml index d6defa7431..1383562b7e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -93,6 +93,9 @@ linters: - interfacebloat - loggercheck - reassign + - ginkgolinter + - gocheckcompilerdirectives + - musttag linters-settings: dupl: diff --git a/Makefile-tools.mk b/Makefile-tools.mk index 45a6789507..ecaa18aa07 100644 --- a/Makefile-tools.mk +++ b/Makefile-tools.mk @@ -1,7 +1,7 @@ # Copyright 2022 The Kubernetes Authors. # SPDX-License-Identifier: Apache-2.0 -GOLANGCI_LINT_VERSION=v1.50.1 +GOLANGCI_LINT_VERSION=v1.51.2 MYGOBIN = $(shell go env GOBIN) ifeq ($(MYGOBIN),) diff --git a/api/internal/localizer/builtinplugins.go b/api/internal/localizer/builtinplugins.go index df46bca6cf..c9f48c7c34 100644 --- a/api/internal/localizer/builtinplugins.go +++ b/api/internal/localizer/builtinplugins.go @@ -131,6 +131,7 @@ func (lbp *localizeBuiltinPlugins) localizeAll(node *yaml.RNode) error { // We rely on the build command to throw errors for nodes in // built-in plugins that are sequences when expected to be scalar, // and vice versa. + //nolint: exhaustive switch node.YNode().Kind { case yaml.SequenceNode: return errors.Wrap(node.VisitElements(lbp.localizeScalar))