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.

70 lines
1.6 KiB

7 years ago
  1. .PHONEY: all test install get_vendor_deps ensure_tools codegen wordlist
  2. GOTOOLS = \
  3. github.com/Masterminds/glide \
  4. github.com/jteeuwen/go-bindata/go-bindata \
  5. github.com/alecthomas/gometalinter
  6. REPO:=github.com/tendermint/go-crypto
  7. all: get_vendor_deps metalinter_test test
  8. test:
  9. go test -p 1 `glide novendor`
  10. get_vendor_deps: ensure_tools
  11. @rm -rf vendor/
  12. @echo "--> Running glide install"
  13. @glide install
  14. ensure_tools:
  15. go get $(GOTOOLS)
  16. wordlist:
  17. go-bindata -ignore ".*\.go" -o keys/wordlist/wordlist.go -pkg "wordlist" keys/wordlist/...
  18. prepgen: install
  19. go install ./vendor/github.com/btcsuite/btcutil/base58
  20. go install ./vendor/github.com/stretchr/testify/assert
  21. go install ./vendor/github.com/stretchr/testify/require
  22. go install ./vendor/golang.org/x/crypto/bcrypt
  23. codegen:
  24. @echo "--> regenerating all interface wrappers"
  25. @gen
  26. @echo "Done!"
  27. metalinter: ensure_tools
  28. @gometalinter --install
  29. gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
  30. metalinter_test: ensure_tools
  31. @gometalinter --install
  32. gometalinter --vendor --deadline=600s --disable-all \
  33. --enable=deadcode \
  34. --enable=gas \
  35. --enable=goconst \
  36. --enable=gocyclo \
  37. --enable=gosimple \
  38. --enable=ineffassign \
  39. --enable=interfacer \
  40. --enable=maligned \
  41. --enable=megacheck \
  42. --enable=misspell \
  43. --enable=safesql \
  44. --enable=staticcheck \
  45. --enable=structcheck \
  46. --enable=unconvert \
  47. --enable=unused \
  48. --enable=vet \
  49. --enable=varcheck \
  50. --enable=vetshadow \
  51. ./...
  52. #--enable=dupl \
  53. #--enable=errcheck \
  54. #--enable=goimports \
  55. #--enable=golint \ <== comments on anything exported
  56. #--enable=gotype \
  57. #--enable=unparam \