@@ -87,6 +87,7 @@ cleanup-test-e2e: ## Tear down the Kind cluster used for e2e tests
8787.PHONY : lint
8888lint : golangci-lint # # Run golangci-lint linter
8989 $(GOLANGCI_LINT ) run
90+ $(NILAWAY ) -include-pkgs=github.com/scaleway/cluster-api-provider-scaleway ./...
9091
9192.PHONY : lint-fix
9293lint-fix : golangci-lint # # Run golangci-lint linter and perform fixes
@@ -189,6 +190,7 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
189190CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen
190191ENVTEST ?= $(LOCALBIN ) /setup-envtest
191192GOLANGCI_LINT = $(LOCALBIN ) /golangci-lint
193+ NILAWAY = $(LOCALBIN ) /nilaway
192194
193195# # Tool Versions
194196KUSTOMIZE_VERSION ?= v5.6.0
@@ -198,6 +200,7 @@ ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller
198200# ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
199201ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.% d", $$3}')
200202GOLANGCI_LINT_VERSION ?= v2.1.0
203+ NILAWAY_VERSION ?= latest
201204
202205.PHONY : kustomize
203206kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
@@ -227,6 +230,11 @@ golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
227230$(GOLANGCI_LINT ) : $(LOCALBIN )
228231 $(call go-install-tool,$(GOLANGCI_LINT ) ,github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION ) )
229232
233+ .PHONY : nilaway
234+ nilaway : $(NILAWAY ) # # Download nilaway locally if necessary.
235+ $(NILAWAY ) : $(LOCALBIN )
236+ $(call go-install-tool,$(NILAWAY ) ,go.uber.org/nilaway/cmd/nilaway,$(NILAWAY_VERSION ) )
237+
230238# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
231239# $1 - target path with name of binary
232240# $2 - package url which can be installed
0 commit comments