Browse Source

metalinter: add linter to Makefile like tendermint

pull/1780/head
Zach Ramsay 7 years ago
committed by Ethan Buchman
parent
commit
bd9f1d0d4c
1 changed files with 36 additions and 1 deletions
  1. +36
    -1
      Makefile

+ 36
- 1
Makefile View File

@ -1,6 +1,7 @@
GOTOOLS = \ GOTOOLS = \
github.com/mitchellh/gox \ github.com/mitchellh/gox \
github.com/Masterminds/glide
github.com/Masterminds/glide \
github.com/alecthomas/gometalinter
all: protoc install test all: protoc install test
@ -50,4 +51,38 @@ get_vendor_deps:
@ go get github.com/Masterminds/glide @ go get github.com/Masterminds/glide
@ glide install @ glide install
metalinter: tools
@gometalinter --install
gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
metalinter_test: tools
@gometalinter --install
gometalinter --vendor --deadline=600s --disable-all \
--enable=deadcode \
--enable=gas \
--enable=goimports \
--enable=gosimple \
--enable=gotype \
--enable=ineffassign \
--enable=misspell \
--enable=safesql \
--enable=structcheck \
--enable=varcheck \
./...
#--enable=aligncheck \
#--enable=dupl \
#--enable=errcheck \
#--enable=goconst \
#--enable=gocyclo \
#--enable=golint \ <== comments on anything exported
#--enable=interfacer \
#--enable=megacheck \
#--enable=staticcheck \
#--enable=unconvert \
#--enable=unparam \
#--enable=unused \
#--enable=vet \
#--enable=vetshadow \
.PHONY: all build test fmt lint get_deps tools .PHONY: all build test fmt lint get_deps tools

Loading…
Cancel
Save