-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (40 loc) · 1.18 KB
/
Makefile
File metadata and controls
47 lines (40 loc) · 1.18 KB
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
38
39
40
41
42
43
44
45
46
47
.PHONY: setup
setup: ## Install all the build and lint dependencies
go get -u golang.org/x/tools/cmd/cover
go get -u github.com/alecthomas/gometalinter
gometalinter --install --update
go get -u github.com/golang/dep/cmd/dep
.PHONY: dep
dep: ## Run dep ensure
dep ensure
.PHONY: lint
lint: ## Run all the linters
gometalinter --vendor --disable-all \
--enable=deadcode \
--enable=goconst \
--enable=goimports \
--enable=gosimple \
--enable=ineffassign \
--enable=interfacer \
--enable=maligned \
--enable=misspell \
--enable=staticcheck \
--enable=unconvert \
--enable=varcheck \
--enable=vet \
--enable=vetshadow \
--deadline=10m \
./...
.PHONY: test
test: ## Run all the tests
echo 'mode: atomic' > coverage.txt && go test -v -race -covermode=atomic -coverprofile=coverage.txt -timeout=30s ./...
.PHONY: cover
cover: test ## Run all the tests and opens the coverage report
go tool cover -html=coverage.txt
.PHONY: build
build: ## Build a binary
go build -v -o ./bin/outlyer ./cmd/outlyer
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := build