diff options
author | baude <bbaude@redhat.com> | 2019-07-22 13:08:06 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-07-22 15:44:04 -0500 |
commit | 0c3038d4b5479e475217f2990107f376024d5726 (patch) | |
tree | fa0936d65d105c8943f40366b0bcb3685d8c0f12 /Makefile | |
parent | ab7b47ca60da11f9e24688cfe2ae3d00eb123471 (diff) | |
download | podman-0c3038d4b5479e475217f2990107f376024d5726.tar.gz podman-0c3038d4b5479e475217f2990107f376024d5726.tar.bz2 podman-0c3038d4b5479e475217f2990107f376024d5726.zip |
golangci-lint phase 4
clean up some final linter issues and add a make target for
golangci-lint. in addition, begin running the tests are part of the
gating tasks in cirrus ci.
we cannot fully shift over to the new linter until we fix the image on
the openshift side. for short term, we will use both
Signed-off-by: baude <bbaude@redhat.com>
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 \ |