File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # # help: print this help message
2+ .PHONY : help
3+ help :
4+ @echo ' Usage:'
5+ @sed -n ' s/^##//p' ${MAKEFILE_LIST} | column -t -s ' :' | sed -e ' s/^/ /'
6+
7+ # # audit: format, vet and test all code
8+ .PHONY : audit
9+ audit :
10+ @echo ' Formatting code...'
11+ go fmt ./...
12+ @echo ' Vetting code...'
13+ go vet ./...
14+ @echo ' Running tests...'
15+ go test -short -race -vet=off ./...
16+
17+ # # test: run tests
18+ .PHONY : test
19+ test :
20+ go test -shuffle=on -short -vet=off -race -timeout 15s -covermode=atomic -coverprofile=/tmp/profile.out ./...
21+
22+ # # cover: run test coverage
23+ .PHONY : cover
24+ cover :
25+ go test -short -covermode=count -coverprofile=/tmp/profile.out ./...
26+
27+ # # analyze: analyze test coverage in your browser
28+ .PHONY : analyze
29+ analyze : cover
30+ go tool cover -html=/tmp/profile.out
31+
32+ # # lint: run linters
33+ .PHONY : lint
34+ lint :
35+ golangci-lint run --fix ./...
36+
37+ # # fix: run go fix
38+ .PHONY : fix
39+ fix :
40+ go fix ./...
41+
42+ # # verify: fix, lint and test
43+ .PHONY : verify
44+ verify : fix lint test
45+ go mod verify
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments