From 3016c2574b409f43a7491ce3abe1af71775ff279 Mon Sep 17 00:00:00 2001 From: Stavros Foteinopoulos Date: Wed, 17 Apr 2024 11:37:12 +0300 Subject: [PATCH] fix lint command Signed-off-by: Stavros Foteinopoulos --- Makefile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 6861ffb..24d5b03 100644 --- a/Makefile +++ b/Makefile @@ -35,12 +35,14 @@ check-style: govet lint @echo Checking for style guide compliance ## Runs lint against all packages. -.PHONY: lint -lint: - @echo Running lint - env GO111MODULE=off $(GO) get -u golang.org/x/lint/golint - golint -set_exit_status ./... - @echo lint success +lint: $(GOPATH)/bin/golangci-lint + @echo Running golangci-lint + golangci-lint run + +## Runs lint against all packages for changes only +lint-changes: $(GOPATH)/bin/golangci-lint + @echo Running golangci-lint over changes only + golangci-lint run -n ## Runs govet against all packages. .PHONY: vet @@ -156,3 +158,11 @@ deps: .PHONY: unittest unittest: $(GO) test ./... -v -covermode=count -coverprofile=coverage.out + + +## -------------------------------------- +## Tooling Binaries +## -------------------------------------- + +$(GOPATH)/bin/golangci-lint: ## Install golangci-lint + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCILINT_VER)