From b375d44374052da5a62f82e4540b9149d770b40d Mon Sep 17 00:00:00 2001 From: Bortlesboat Date: Thu, 26 Mar 2026 20:23:05 -0400 Subject: [PATCH] fix: update lint Makefile target to use system golangci-lint Fixes #377 After PR #253 removed golangci-lint from Go tools, make lint fails with 'go: no such tool golangci-lint'. Update the GOLANGCI_LINT variable to use the system-installed binary instead of go tool, and add a pre-flight check with an install link on failure. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 93303bec..5047e9f1 100644 --- a/Makefile +++ b/Makefile @@ -474,11 +474,12 @@ release-cli: bin/arctl-darwin-amd64.sha256 release-cli: bin/arctl-darwin-arm64.sha256 release-cli: bin/arctl-windows-amd64.exe.sha256 -GOLANGCI_LINT ?= go tool golangci-lint +GOLANGCI_LINT ?= $(shell which golangci-lint 2>/dev/null || echo "golangci-lint") GOLANGCI_LINT_ARGS ?= --fix .PHONY: lint lint: ## Run golangci-lint linter + @command -v $(GOLANGCI_LINT) >/dev/null 2>&1 || { echo "Error: golangci-lint not found. Install: https://golangci-lint.run/welcome/install/"; exit 1; } $(GOLANGCI_LINT) run $(GOLANGCI_LINT_ARGS) .PHONY: lint-ui