-
Notifications
You must be signed in to change notification settings - Fork 537
/
Makefile
56 lines (43 loc) · 991 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
47
48
49
50
51
52
53
54
55
56
SHELL := /bin/bash
.PHONY: \
help \
coverage \
vet \
lint \
fmt \
version
all: imports fmt lint vet errors build
help:
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
@echo 'Available targets are:'
@echo ''
@echo ' help Show this help screen.'
@echo ' coverage Report code tests coverage.'
@echo ' vet Run go vet.'
@echo ' lint Run golint.'
@echo ' fmt Run go fmt.'
@echo ' version Display Go version.'
@echo ''
@echo 'Targets run by default are: lint, vet.'
@echo ''
print-%:
@echo $* = $($*)
deps:
go get golang.org/x/lint/golint
coverage:
go test $(go list ./... | grep -v examples) -coverprofile coverage.txt ./...
vet:
go vet ./...
lint: deps
golint ./...
fmt:
go install mvdan.cc/gofumpt@latest
gofumpt -l -w -extra .
pre-dev:
make pre-commit
pre-commit:
bash script/pre-commit-hook
release: package-release sign-release
version:
@go version