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.

88 lines
2.0 KiB

9 years ago
8 years ago
8 years ago
9 years ago
8 years ago
9 years ago
9 years ago
8 years ago
9 years ago
8 years ago
8 years ago
  1. GOTOOLS = \
  2. github.com/mitchellh/gox \
  3. github.com/Masterminds/glide \
  4. github.com/alecthomas/gometalinter
  5. all: protoc install test
  6. NOVENDOR = go list github.com/tendermint/abci/... | grep -v /vendor/
  7. install-protoc:
  8. # Download: https://github.com/google/protobuf/releases
  9. go get github.com/golang/protobuf/protoc-gen-go
  10. protoc:
  11. @ protoc --go_out=plugins=grpc:. types/*.proto
  12. install:
  13. @ go install github.com/tendermint/abci/cmd/...
  14. build:
  15. @ go build -i github.com/tendermint/abci/cmd/...
  16. dist:
  17. @ bash scripts/dist.sh
  18. @ bash scripts/publish.sh
  19. # test.sh requires that we run the installed cmds, must not be out of date
  20. test: install
  21. find . -path ./vendor -prune -o -name *.sock -exec rm {} \;
  22. @ go test -p 1 `${NOVENDOR}`
  23. @ bash tests/test.sh
  24. fmt:
  25. @ go fmt ./...
  26. lint:
  27. @ go get -u github.com/golang/lint/golint
  28. @ for file in $$(find "." -name '*.go' | grep -v '/vendor/' | grep -v '\.pb\.go'); do \
  29. golint -set_exit_status $${file}; \
  30. done;
  31. test_integrations: get_vendor_deps install test
  32. get_deps:
  33. @ go get -d `${NOVENDOR}`
  34. tools:
  35. go get -u -v $(GOTOOLS)
  36. get_vendor_deps:
  37. @ go get github.com/Masterminds/glide
  38. @ glide install
  39. metalinter: tools
  40. @gometalinter --install
  41. gometalinter --vendor --deadline=600s --enable-all --disable=lll ./...
  42. metalinter_test: tools
  43. @gometalinter --install
  44. gometalinter --vendor --deadline=600s --disable-all \
  45. --enable=aligncheck \
  46. --enable=deadcode \
  47. --enable=gas \
  48. --enable=goconst \
  49. --enable=goimports \
  50. --enable=gosimple \
  51. --enable=gotype \
  52. --enable=ineffassign \
  53. --enable=megacheck \
  54. --enable=misspell \
  55. --enable=staticcheck \
  56. --enable=safesql \
  57. --enable=structcheck \
  58. --enable=unconvert \
  59. --enable=unused \
  60. --enable=varcheck \
  61. --enable=vetshadow \
  62. ./...
  63. #--enable=dupl \
  64. #--enable=errcheck \
  65. #--enable=gocyclo \
  66. #--enable=golint \ <== comments on anything exported
  67. #--enable=interfacer \
  68. #--enable=unparam \
  69. #--enable=vet \
  70. .PHONY: all build test fmt lint get_deps tools