2017-05-02 23:49:29 +00:00
|
|
|
.DEFAULT_GOAL := test-and-lint
|
|
|
|
|
2019-08-14 09:00:39 +00:00
|
|
|
.PHONY: test-and-lint
|
2017-05-02 23:49:29 +00:00
|
|
|
test-and-lint: test lint
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
2019-08-14 09:00:39 +00:00
|
|
|
go test -v -cover -race ./...
|
2017-05-02 23:49:29 +00:00
|
|
|
|
2019-08-14 09:00:39 +00:00
|
|
|
.PHONY: cover
|
2017-05-02 23:49:29 +00:00
|
|
|
cover:
|
2019-08-14 09:00:39 +00:00
|
|
|
go test -v -coverprofile=coverage.txt -covermode=atomic -race ./...
|
2017-05-02 23:49:29 +00:00
|
|
|
|
|
|
|
.PHONY: lint
|
|
|
|
lint:
|
|
|
|
go fmt ./...
|
|
|
|
golint ./...
|
|
|
|
@# Run again with magic to exit non-zero if golint outputs anything.
|
|
|
|
@! (golint ./... | read dummy)
|
|
|
|
go vet ./...
|