From e0a0144d77649499fab11ad523e4f1d710b7c52d Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Sun, 1 Mar 2026 14:21:36 +0000 Subject: [PATCH] build(makefile): add lint target using golangci-lint Introduces a new `lint` Makefile target that checks for golangci-lint installation, runs the linter to match CI pipeline, and updates the help message accordingly. --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1ab39c3..7d7538d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: test test-cover test-agent build install clean +.PHONY: test test-cover test-agent lint build install clean test: go test ./... -v @@ -12,6 +12,10 @@ test-cover: test-agent: go test -run TestAgent ./... -v +lint: + @which golangci-lint > /dev/null || (echo "❌ golangci-lint not found. Install with:" && echo " go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest" && exit 1) + golangci-lint run + build: @mkdir -p build go build -ldflags "-s -w" -trimpath -o build/grokkit . @@ -30,6 +34,7 @@ help: @echo " test Run all tests" @echo " test-cover Run tests + generate HTML coverage report" @echo " test-agent Run only agent tests" + @echo " lint Run golangci-lint (matches CI pipeline)" @echo " build Build optimized binary" @echo " install Build and install to ~/.local/bin" @echo " clean Remove build artifacts" \ No newline at end of file