-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (27 loc) · 846 Bytes
/
Makefile
File metadata and controls
34 lines (27 loc) · 846 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
32
33
34
# Make this makefile self-documented with target `help`
.PHONY: help
.DEFAULT_GOAL := help
help: ## Show help
@grep -Eh '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: bench
bench: ## Run benchmarks
cd benchmark && go test -bench=. -benchmem -benchtime=5s
.PHONY: fmt
fmt: ## Format go files
goimports -w .
.PHONY: lint
lint: ## Lint go files
golangci-lint run -v
.PHONY: test
test: ## Run tests
go test -v -failfast -race -timeout 1m ./...
.PHONY: generate
generate: ## Generate files
go generate ./...
.PHONY: download
download: ## Download dependencies
@echo Download go.mod dependencies
@go mod download
.PHONE: vulncheck
vulncheck: ## Check for Vulnerabilities (make sure you have the tools install: `make install-tools`)
govulncheck ./...