From a4de88d87ddf9f26eb9b3d297c78b0ddfcadf43b Mon Sep 17 00:00:00 2001 From: Manuel Mendez Date: Fri, 10 May 2024 16:10:01 -0400 Subject: [PATCH] make: Install golangci-lint to $CWD/bin This way we start a pattern of installing them locally. Not a big deal for golangci-lint but will be useful later in this PR. --- .gitignore | 1 + Makefile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3bdf0aa5..58c6002c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ ### Go template +/bin/ # Test binary, build with `go test -c` *.test diff --git a/Makefile b/Makefile index caed6cd6..3bae0650 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,15 @@ .DEFAULT_GOAL := help +export GOBIN=$(CURDIR)/bin +export PATH:=$(PATH):$(GOBIN) + ## Run all linters lint: golangci-lint ## Run golangci-lint golangci-lint: - go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57 run --config .golangci.yml + go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57 + golangci-lint run --config .golangci.yml ## Run go test go-test: