-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 741 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (21 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.DEFAULT_GOAL := help
.PHONY: help build test fmt vet lint check tidy install
help: ## Display this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-10s\033[0m %s\n", $$1, $$2}'
build: ## Build all packages
go build ./...
test: ## Run tests with the race detector
go test -race ./...
fmt: ## Format the code
gofmt -w .
vet: ## Run go vet
go vet ./...
lint: ## Static checks: gofmt (check) + go vet
@test -z "$$(gofmt -l .)" || (echo "gofmt needed in:"; gofmt -l .; exit 1)
go vet ./...
check: lint test ## Lint + test (mirror CI locally, run before a PR)
tidy: ## go mod tidy
go mod tidy
install: ## Install the stevedore binary into GOPATH/bin
go install .