-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (29 loc) · 830 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
.PHONY: default
default: all
.PHONE: all
all: build test
.PHONY: clean
clean:
go clean ./...
.PHONY: build
build:
go build ./...
.PHONY: test
test:
go test -race -count=1 ./...
./fuzz.sh
.PHONY: test-v
test-v:
GOLOG_LOG_LEVEL=debug go test -race -count=1 -v ./...
GOLOG_LOG_LEVEL=debug ./fuzz.sh
.PHONY: coverage-html
coverage-html: ## Generate test coverage report and open in browser
go test ./... -coverprofile=test-coverage.out
go tool cover -html=test-coverage.out
.PHONY: watch
watch:
watchexec -c "make test"
.PHONY: lint
lint: ## Run style checks and verify syntax
go vet -asmdecl -assign -atomic -bools -buildtag -cgocall -copylocks -httpresponse -loopclosure -lostcancel -nilfunc -printf -shift -stdmethods -structtag -tests -unmarshal -unreachable -unsafeptr -unusedresult ./...
test -z $(gofmt -l .)