From 1c13f32d15db19aacd79c670a628f6b53ecf1f3e Mon Sep 17 00:00:00 2001 From: PabloHiro Date: Fri, 4 Jul 2025 13:40:51 +0200 Subject: [PATCH] Makefile to use same linter as CI --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 14c23d33d..542a5a7f7 100644 --- a/Makefile +++ b/Makefile @@ -95,8 +95,15 @@ kubectl: chmod 0700 $(KUBECTL_BINARY); \ fi -lint: - @golint cmd/... pkg/... example/... +GOLANGCI_LINT_VERSION ?= v1.60.3 +GOLANGCI_LINT_BINARY := $(shell go env GOPATH)/bin/golangci-lint + +lint: $(GOLANGCI_LINT_BINARY) + @$(GOLANGCI_LINT_BINARY) run cmd/... pkg/... example/... + +$(GOLANGCI_LINT_BINARY): + @echo "Installing golangci-lint $(GOLANGCI_LINT_VERSION)..." + @curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(shell go env GOPATH)/bin $(GOLANGCI_LINT_VERSION) receptorctl-lint: receptor @cd receptorctl && nox -s lint