summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e155d31d4..2ebcb6605 100644
--- a/Makefile
+++ b/Makefile
@@ -136,6 +136,9 @@ lint: .gopathok varlink_generate ## Execute the source code linter
@echo "checking lint"
@./.tool/lint
+golangci-lint: .gopathok varlink_generate .install.golangci-lint
+ $(GOBIN)/golangci-lint run --tests=false
+
gofmt: ## Verify the source code gofmt
find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
git diff --exit-code
@@ -360,7 +363,7 @@ uninstall:
GIT_CHECK_EXCLUDE="./vendor" $(GOBIN)/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
.PHONY: install.tools
-install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ginkgo ## Install needed tools
+install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ginkgo .install.golangci-lint ## Install needed tools
define go-get
env GO111MODULE=off \
@@ -386,6 +389,11 @@ endef
$(GOBIN)/gometalinter --install; \
fi
+.install.golangci-lint: .gopathok
+ if [ ! -x "$(GOBIN)/golangci-lint" ]; then \
+ curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOBIN)/ v1.17.1; \
+ fi
+
.install.md2man: .gopathok
if [ ! -x "$(GOBIN)/go-md2man" ]; then \
$(call go-get,github.com/cpuguy83/go-md2man); \
@@ -444,6 +452,7 @@ vendor:
gofmt \
help \
install \
+ golangci-lint \
lint \
pause \
uninstall \