You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.2 KiB

  1. .PHONY: all test get_vendor_deps ensure_tools
  2. GOTOOLS = \
  3. github.com/Masterminds/glide \
  4. github.com/alecthomas/gometalinter
  5. PACKAGES=$(shell go list ./... | grep -v '/vendor/')
  6. REPO:=github.com/tendermint/tmlibs
  7. all: test
  8. test:
  9. @echo "--> Running linter"
  10. @make metalinter_test
  11. @echo "--> Running go test"
  12. @go test $(PACKAGES)
  13. get_vendor_deps: ensure_tools
  14. @rm -rf vendor/
  15. @echo "--> Running glide install"
  16. @glide install
  17. ensure_tools:
  18. go get $(GOTOOLS)
  19. @gometalinter --install
  20. metalinter:
  21. gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
  22. metalinter_test:
  23. gometalinter --vendor --deadline=600s --disable-all \
  24. --enable=deadcode \
  25. --enable=goconst \
  26. --enable=gosimple \
  27. --enable=ineffassign \
  28. --enable=interfacer \
  29. --enable=megacheck \
  30. --enable=misspell \
  31. --enable=staticcheck \
  32. --enable=safesql \
  33. --enable=structcheck \
  34. --enable=unconvert \
  35. --enable=unused \
  36. --enable=varcheck \
  37. --enable=vetshadow \
  38. --enable=vet \
  39. ./...
  40. #--enable=gas \
  41. #--enable=aligncheck \
  42. #--enable=dupl \
  43. #--enable=errcheck \
  44. #--enable=gocyclo \
  45. #--enable=goimports \
  46. #--enable=golint \ <== comments on anything exported
  47. #--enable=gotype \
  48. #--enable=unparam \