OSDN Git Service

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