forked from hipages/php-fpm_exporter
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (21 loc) · 767 Bytes
/
Makefile
File metadata and controls
29 lines (21 loc) · 767 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
.PHONY: test
.DEFAULT_GOAL := help
help: ## List targets & descriptions
@cat Makefile* | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
deps: ## Get dependencies
go get -d -v ./...
test: ## Run tests
go test -short ./...
test-coverage: ## Create a code coverage report
mkdir -p .cover
go test -coverprofile .cover/cover.out ./...
test-coverage-html: ## Create a code coverage report in HTML
mkdir -p .cover
go test -coverprofile .cover/cover.out ./...
go tool cover -html .cover/cover.out
lint: gometalinter ## Run linters
! goimports -d . | grep -vF 'No Exceptions'
fmt: ## Fix formatting issues
goimports -w .
gometalinter:
gometalinter --disable-all --enable=golint ./...