Elia Battiston | c8d0d46 | 2022-02-22 16:30:51 +0100 | [diff] [blame^] | 1 | .DEFAULT_GOAL := test-and-lint |
2 | |||||
3 | .PHONY: test-and-lint | ||||
4 | test-and-lint: test lint | ||||
5 | |||||
6 | .PHONY: test | ||||
7 | test: | ||||
8 | go test -v -cover -race ./... | ||||
9 | |||||
10 | .PHONY: cover | ||||
11 | cover: | ||||
12 | go test -v -coverprofile=coverage.txt -covermode=atomic -race ./... | ||||
13 | |||||
14 | .PHONY: lint | ||||
15 | lint: | ||||
16 | go fmt ./... | ||||
17 | golint ./... | ||||
18 | @# Run again with magic to exit non-zero if golint outputs anything. | ||||
19 | @! (golint ./... | read dummy) | ||||
20 | go vet ./... |