Debian Codegraph @

Makefile

raw
1 COVERAGE_REPORT ?= coverage.out
2
3 .PHONY: help
4 help: ## Display this help screen
5 @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
6
7 .PHONY: all
8 all: fmt vet test ## Run fmt, vet and test
9
10 .PHONY: test
11 test: ## Run tests with race detector and coverage
12 go test -v -race -coverprofile=$(COVERAGE_REPORT) ./...
13
14 .PHONY: fmt
15 fmt: ## Run go fmt
16 go fmt ./...
17
18 .PHONY: vet
19 vet: ## Run go vet
20 go vet ./...