- Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (16 loc) · 619 Bytes
/
Makefile
File metadata and controls
22 lines (16 loc) · 619 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: help prepare lint test coverage clean
.DEFAULT_GOAL := help
prepare: ## Prepare build prerequisities
GO111MODULE=on go get
clean: ## clean working tree
rm coverage.out
lint: ## Run the linters
go vet ./...
#revive -formatter friendly -config .circleci/revive.toml ./...
#gosec -exclude=G104 -tests ./...
test: ## Run tests
go test -race -cover -coverprofile=coverage.out ./...
coverage: ## Show code coverage with tests
go tool cover -html=coverage.out
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'