mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	hack: verify golangci-lint config, update text
This commit is contained in:
		@@ -205,7 +205,7 @@ linters-settings: # please keep this alphabetized
 | 
				
			|||||||
      msg: should not be used because managedFields was removed
 | 
					      msg: should not be used because managedFields was removed
 | 
				
			||||||
    - p: \.Add$
 | 
					    - p: \.Add$
 | 
				
			||||||
      pkg: ^k8s\.io/component-base/featuregate$
 | 
					      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$
 | 
					    - p: ^gomega\.BeTrue$
 | 
				
			||||||
      pkg: ^github.com/onsi/gomega$
 | 
					      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(...) }"
 | 
					      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
 | 
					      msg: should not be used because managedFields was removed
 | 
				
			||||||
    - p: \.Add$
 | 
					    - p: \.Add$
 | 
				
			||||||
      pkg: ^k8s\.io/component-base/featuregate$
 | 
					      pkg: ^k8s\.io/component-base/featuregate$
 | 
				
			||||||
      msg: should not use MutableFeatureGate.Add, use AddVersioned instead
 | 
					      msg: should not use Add, use AddVersioned instead
 | 
				
			||||||
  gocritic:
 | 
					  gocritic:
 | 
				
			||||||
    enabled-checks:
 | 
					    enabled-checks:
 | 
				
			||||||
      - equalFold
 | 
					      - equalFold
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -223,7 +223,7 @@ linters-settings: # please keep this alphabetized
 | 
				
			|||||||
      msg: should not be used because managedFields was removed
 | 
					      msg: should not be used because managedFields was removed
 | 
				
			||||||
    - p: \.Add$
 | 
					    - p: \.Add$
 | 
				
			||||||
      pkg: ^k8s\.io/component-base/featuregate$
 | 
					      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}}
 | 
					    {{- if .Hints}}
 | 
				
			||||||
    - p: ^gomega\.BeTrue$
 | 
					    - p: ^gomega\.BeTrue$
 | 
				
			||||||
      pkg: ^github.com/onsi/gomega$
 | 
					      pkg: ^github.com/onsi/gomega$
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@
 | 
				
			|||||||
# limitations under the License.
 | 
					# limitations under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This script checks that all generated golangci-lint configurations
 | 
					# 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 errexit
 | 
				
			||||||
set -o nounset
 | 
					set -o nounset
 | 
				
			||||||
@@ -24,4 +24,9 @@ set -o pipefail
 | 
				
			|||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
 | 
					KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
 | 
				
			||||||
source "${KUBE_ROOT}/hack/lib/verify-generated.sh"
 | 
					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
 | 
					kube::verify::generated "" "Please run 'hack/update-golangci-lint-config.sh'" hack/update-golangci-lint-config.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"${golangci[@]}" config verify --config="${golangci_config}"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user