From 386aba18c0eb0e9c443da3e707d442187db3d57f Mon Sep 17 00:00:00 2001 From: Michael Kuhnt Date: Tue, 26 Nov 2024 07:49:08 +0100 Subject: [PATCH] set specific linter version --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 2a997f66..98c12805 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,17 @@ create-release-files: release: build-static create-release-files ## Create a release ##@ Lint / Verify +GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint + +## Tool Versions +GOLANGCI_LINT_VERSION ?= v1.61.0 + +.PHONY: golangci-lint +golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary. If wrong version is installed, it will be overwritten. +$(GOLANGCI_LINT): $(LOCALBIN) + test -s $(LOCALBIN)/golangci-lint && $(LOCALBIN)/golangci-lint --version | grep -q $(GOLANGCI_LINT_VERSION) || \ + GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) + .PHONY: lint lint: golangci-lint $(GOLANGCI_LINT) ## Run linting. $(GOLANGCI_LINT) run -v --build-tags=testing,integration $(GOLANGCI_LINT_EXTRA_ARGS)