diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-23 10:21:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 10:21:41 +0200 |
commit | 26749204d5fcd333706bef187b75cd3c6b39b835 (patch) | |
tree | 1fe72a798eef9d803e7714ea877304f1568171bd /Makefile | |
parent | a12a2312ac5c6c485eaa1d45e4b7e29d6cc4a9ff (diff) | |
parent | 0c3038d4b5479e475217f2990107f376024d5726 (diff) | |
download | podman-26749204d5fcd333706bef187b75cd3c6b39b835.tar.gz podman-26749204d5fcd333706bef187b75cd3c6b39b835.tar.bz2 podman-26749204d5fcd333706bef187b75cd3c6b39b835.zip |
Merge pull request #3621 from baude/golangcilint4
golangci-lint phase 4
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 \ |