mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
fix: use fmt.Errorf instead of non-existing errors.New (#5651)
* fix: use fmt.Errorf ubstead if non-exising `errors.New` When https://github.com/kubernetes-sigs/kustomize/pull/5525 merged, it referenced `errors.New` function but that function doesn't exist. This PR replaces the call with simple `fmt.Errorf`. * Add lint check with kustomize_disable_go_plugin_support * move lint-api-static to /api/Makefile * clean golangci cache
This commit is contained in:
15
api/Makefile
15
api/Makefile
@@ -11,3 +11,18 @@ build:
|
||||
|
||||
generate: $(MYGOBIN)/k8scopy $(MYGOBIN)/stringer
|
||||
go generate ./...
|
||||
|
||||
lint: lint-api-static
|
||||
|
||||
## lint-api-static runs the linter on the API module
|
||||
## with build-tag kustomize_disable_go_plugin_support
|
||||
## this aims to catch any issues with the API module
|
||||
## that would prevent the API module from being used
|
||||
## when the go plugin support is disabled.
|
||||
lint-api-static:
|
||||
$(MYGOBIN)/golangci-lint cache clean # Workaround for https://github.com/golangci/golangci-lint/issues/3228
|
||||
$(MYGOBIN)/golangci-lint \
|
||||
-c $$KUSTOMIZE_ROOT/.golangci.yml \
|
||||
--build-tags kustomize_disable_go_plugin_support \
|
||||
--path-prefix api \
|
||||
run ./...
|
||||
|
||||
Reference in New Issue
Block a user