From bc2b8b85fbaa3047d77e05a101550bdee30a206f Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Wed, 30 Oct 2019 12:48:51 +0100 Subject: [PATCH] Fix golangci-lint target for non GOPATH installations (#12934) * Fix golangci-lint target for non GOPATH installations * Link to https://github.com/golangci/golangci-lint#install --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 950bd877e7..08c3896881 100644 --- a/Makefile +++ b/Makefile @@ -173,17 +173,15 @@ gofmt: ## Runs gofmt against all packages. done @echo "gofmt success"; \ -golangci-lint: +golangci-lint: ## Run golangci-lint on codebasis # https://stackoverflow.com/a/677212/1027058 (check if a command exists or not) -# https://github.com/golangci/golangci-lint#binary-release -# It is recommended to NOT use go get, but instead use a binary release pinned to a version. - @if ! [ -x "$$(command -v golangci-lint)" ]; then \ - echo "golangci-lint is not installed. Please run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOPATH)/bin v1.21.0"; \ + @if ! [ -x "$$(command -v golangci-lintt)" ]; then \ + echo "golangci-lint is not installed. Please see https://github.com/golangci/golangci-lint#install for installation instructions."; \ exit 1; \ fi; \ @echo Running golangci-lint - $(GOPATH)/bin/golangci-lint run + golangci-lint run megacheck: ## Run megacheck on codebasis env GO111MODULE=off go get -u honnef.co/go/tools/cmd/megacheck