@@ -75,8 +75,6 @@ ENVSUBST_BIN := envsubst
7575ENVSUBST := $(TOOLS_BIN_DIR ) /$(ENVSUBST_BIN )
7676
7777GOLANGCI_LINT_VER := v2.1.6
78- GOLANGCI_LINT_BIN := golangci-lint
79- GOLANGCI_LINT := $(TOOLS_BIN_DIR ) /$(GOLANGCI_LINT_BIN ) -$(GOLANGCI_LINT_VER )
8078
8179KIND_VER := v0.29.0
8280KIND_BIN := kind
@@ -244,9 +242,6 @@ $(CLUSTERCTL): go.mod ## Build clusterctl binary.
244242$(ENVSUBST ) : # # Build envsubst from tools folder.
245243 GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) github.com/a8m/envsubst/cmd/envsubst $(ENVSUBST_BIN ) $(ENVSUBST_VER )
246244
247- $(GOLANGCI_LINT ) : # # Build golangci-lint from tools folder.
248- GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) github.com/golangci/golangci-lint/cmd/golangci-lint $(GOLANGCI_LINT_BIN ) $(GOLANGCI_LINT_VER )
249-
250245$(GOTESTSUM ) : go.mod # Build gotestsum from tools folder.
251246 GOBIN=$(TOOLS_BIN_DIR ) $(GO_INSTALL ) gotest.tools/gotestsum $(GOTESTSUM_BIN ) $(GOTESTSUM_VER )
252247
@@ -299,15 +294,15 @@ $(KIND_BIN): $(KIND) ## Building Kind from tools folder
299294# # --------------------------------------
300295
301296.PHONY : lint
302- lint : $( GOLANGCI_LINT ) # # Lint codebase
303- $( GOLANGCI_LINT ) run -v $(GOLANGCI_LINT_EXTRA_ARGS )
297+ lint : # # Lint codebase
298+ go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@ ${GOLANGCI_LINT_VER} run -v $(GOLANGCI_LINT_EXTRA_ARGS )
304299
305300.PHONY : lint-fix
306- lint-fix : $( GOLANGCI_LINT ) # # Lint the codebase and run auto-fixers if supported by the linter
301+ lint-fix : # # Lint the codebase and run auto-fixers if supported by the linter
307302 GOLANGCI_LINT_EXTRA_ARGS=--fix $(MAKE ) lint
308303
309- lint-full : $( GOLANGCI_LINT ) # # Run slower linters to detect possible issues
310- $( GOLANGCI_LINT ) run -v --fast=false
304+ lint-full : # # Run slower linters to detect possible issues
305+ go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@ ${GOLANGCI_LINT_VER} run -v --fast=false
311306
312307# # --------------------------------------
313308# # Generate
0 commit comments