forked from coinbase/mesh-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (36 loc) · 1.12 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.PHONY: deps gen lint format check-format test test-coverage add-license \
check-license shorten-lines shellcheck salus release
LICENCE_SCRIPT=addlicense -c "Coinbase, Inc." -l "apache" -v
TEST_SCRIPT=go test -v ./asserter/... ./fetcher/... ./gen/...
deps:
go get ./...
go get github.com/stretchr/testify
go get github.com/davecgh/go-spew
go get github.com/google/addlicense
go get github.com/segmentio/golines
go get github.com/mattn/goveralls
gen:
./codegen.sh
lint:
golangci-lint run -v \
-E golint,misspell,gocyclo,gocritic,whitespace,goconst,gocognit,bodyclose,unconvert,lll,unparam,gomnd
format:
gofmt -s -w -l .
check-format:
! gofmt -s -l . | read
test:
${TEST_SCRIPT}
test-cover:
${TEST_SCRIPT} -coverprofile=c.out -covermode=count
goveralls -coverprofile=c.out -repotoken ${COVERALLS_TOKEN}
add-license:
${LICENCE_SCRIPT} .
check-license:
${LICENCE_SCRIPT} -check .
shorten-lines:
golines -w --shorten-comments asserter fetcher gen
shellcheck:
shellcheck codegen.sh
salus:
docker run --rm -t -v ${PWD}:/home/repo coinbase/salus
release: shellcheck gen add-license shorten-lines format test lint salus