-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (33 loc) · 951 Bytes
/
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
.PHONY: install install-run setup test test_verbose
export GO111MODULE := on
all: bench
install:
go install
install-run: install
$(shell go env GOPATH)/bin/gopl
setup:
brew install pre-commit
brew install golangci/tap/golangci-lint
pre-commit install
export GO111MODULE=off && \
go get -v github.com/fzipp/gocyclo && \
go get -v github.com/go-lintpack/lintpack/... && \
go get -v github.com/go-critic/go-critic/... && \
cd "$(shell go env GOPATH)/src/github.com/go-critic/go-critic" && \
make gocritic && \
echo 'export PATH=$$PATH:$(shell go env GOPATH)/src/github.com/go-critic/go-critic'
test:
go test ./...
bench:
go test -bench . -benchmem ./...
test_verbose:
go test -v ./...
cover:
go test -cover ./...
cover_verbose: cover.out
go tool cover -func=cover.out
cover_html: cover.html
cover.out: $(SRC)
go test -coverprofile=cover.out ./...
cover.html: cover.out
go tool cover -html=cover.out -o cover.html