forked from hoanhan101/algo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 858 Bytes
/
Makefile
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
35
36
37
#
# algo cmd helpers
#
.PHONY: count
count: ## Count the number of questions
go run count.go
.PHONY: clean
clean: ## Clean test cache
go clean -testcache
rm -f coverage.out
.PHONY: cover
cover: test ## Run unit tests and open the coverage report
go tool cover -html=coverage.out
.PHONY: lint
lint: ## Lint source files
golint -set_exit_status ./...
.PHONY: test
test: ## Run unit tests
go test -short -race -coverprofile=coverage.out -covermode=atomic ./...
.PHONY: test-verbose
test-verbose: ## Run tests verbosely
go test -v ./...
.PHONY: ready
ready: clean lint test count ## Clean up, lint source files, run tests and be ready for a push
.PHONY: help
help: ## Print usage information
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
.DEFAULT_GOAL := help