From b189ab676feaffc77797400911c3cb2236d3e7b8 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 16 Aug 2018 10:21:51 -0400 Subject: [PATCH] makefile: lint flags --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e61f62940..1fb3eacb3 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,8 @@ INCLUDE = -I=. -I=${GOPATH}/src -I=${GOPATH}/src/github.com/gogo/protobuf/protob BUILD_TAGS?='tendermint' BUILD_FLAGS = -ldflags "-X github.com/tendermint/tendermint/version.GitCommit=`git rev-parse --short=8 HEAD`" +LINT_FLAGS = --exclude '.*\.pb\.go' --vendor --deadline=600s + all: check build test install check: check_tools get_vendor_deps @@ -39,9 +41,6 @@ protoc_all: protoc_libs protoc_abci protoc_grpc ## Note the $< here is substituted for the %.proto ## Note the $@ here is substituted for the %.pb.go protoc $(INCLUDE) $< --gogo_out=Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,plugins=grpc:. - ## Note we don't use inplace since it's not natively available on mac - @echo "--> adding nolint declarations to protobuf generated files" - @awk '/^\s*package \w+/ { print "//nolint" }1' $@ > $@.tmp && mv $@.tmp $@ ######################################## ### Build ABCI @@ -220,7 +219,7 @@ fmt: metalinter: @echo "--> Running linter" - @gometalinter.v2 --vendor --deadline=600s --disable-all \ + @gometalinter.v2 $(LINT_FLAGS) --disable-all \ --enable=deadcode \ --enable=gosimple \ --enable=misspell \ @@ -249,7 +248,7 @@ metalinter: metalinter_all: @echo "--> Running linter (all)" - gometalinter.v2 --vendor --deadline=600s --enable-all --disable=lll ./... + gometalinter.v2 $(LINT_FLAGS) --enable-all --disable=lll ./... DESTINATION = ./index.html.md