2018-07-13 10:40:28 -05:00
|
|
|
.DEFAULT_GOAL := test-and-lint
|
|
|
|
|
2019-03-20 15:30:34 -05:00
|
|
|
.PHONY: test-and-lint
|
2018-07-13 10:40:28 -05:00
|
|
|
test-and-lint: test lint
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
go test -v -cover -race ./...
|
|
|
|
|
2019-03-20 15:30:34 -05:00
|
|
|
.PHONY: cover
|
2018-07-13 10:40:28 -05:00
|
|
|
cover:
|
2019-03-20 15:30:34 -05:00
|
|
|
go test -v -coverprofile=coverage.txt -covermode=atomic -race ./...
|
2018-07-13 10:40:28 -05:00
|
|
|
|
|
|
|
.PHONY: lint
|
|
|
|
lint:
|
|
|
|
go fmt ./...
|
|
|
|
golint ./...
|
|
|
|
@# Run again with magic to exit non-zero if golint outputs anything.
|
|
|
|
@! (golint ./... | read dummy)
|
|
|
|
go vet ./...
|