Makefile 385 B

1234567891011121314151617181920
  1. .DEFAULT_GOAL := test-and-lint
  2. .PHONY: test-and-lint
  3. test-and-lint: test lint
  4. .PHONY: test
  5. test:
  6. go test -v -cover -race ./...
  7. .PHONY: cover
  8. cover:
  9. go test -v -coverprofile=coverage.txt -covermode=atomic -race ./...
  10. .PHONY: lint
  11. lint:
  12. go fmt ./...
  13. golint ./...
  14. @# Run again with magic to exit non-zero if golint outputs anything.
  15. @! (golint ./... | read dummy)
  16. go vet ./...