@@ -87,6 +87,7 @@ cleanup-test-e2e: ## Tear down the Kind cluster used for e2e tests
87
87
.PHONY : lint
88
88
lint : golangci-lint # # Run golangci-lint linter
89
89
$(GOLANGCI_LINT ) run
90
+ $(NILAWAY ) -include-pkgs=github.com/scaleway/cluster-api-provider-scaleway ./...
90
91
91
92
.PHONY : lint-fix
92
93
lint-fix : golangci-lint # # Run golangci-lint linter and perform fixes
@@ -189,6 +190,7 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
189
190
CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen
190
191
ENVTEST ?= $(LOCALBIN ) /setup-envtest
191
192
GOLANGCI_LINT = $(LOCALBIN ) /golangci-lint
193
+ NILAWAY = $(LOCALBIN ) /nilaway
192
194
193
195
# # Tool Versions
194
196
KUSTOMIZE_VERSION ?= v5.6.0
@@ -198,6 +200,7 @@ ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller
198
200
# ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
199
201
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.% d", $$3}')
200
202
GOLANGCI_LINT_VERSION ?= v2.1.0
203
+ NILAWAY_VERSION ?= latest
201
204
202
205
.PHONY : kustomize
203
206
kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
@@ -227,6 +230,11 @@ golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
227
230
$(GOLANGCI_LINT ) : $(LOCALBIN )
228
231
$(call go-install-tool,$(GOLANGCI_LINT ) ,github.com/golangci/golangci-lint/v2/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION ) )
229
232
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
+
230
238
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
231
239
# $1 - target path with name of binary
232
240
# $2 - package url which can be installed
0 commit comments