-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
43 lines (35 loc) · 799 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
.PHONY: default
default: build
.PHONY: all
all: build vet test
.PHONY: build
build:
go build ./...
go build ./cmd/exhaustive
.PHONY: test
test:
go test -count=1 ./...
.PHONY: testshort
testshort:
go test -short -count=1 ./...
.PHONY: cover
cover:
go test -cover -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
.PHONY: install-vet
install-vet:
go install github.com/nishanths/exhaustive/cmd/exhaustive@latest
go install github.com/gordonklaus/ineffassign@latest
go install github.com/kisielk/errcheck@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
.PHONY: vet
vet:
go vet ./...
exhaustive ./...
ineffassign ./...
errcheck ./...
staticcheck -checks="inherit,-S1034" ./...
.PHONY: upgrade-deps
upgrade-deps:
go get golang.org/x/tools
go mod tidy