-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (21 loc) · 747 Bytes
/
Makefile
File metadata and controls
29 lines (21 loc) · 747 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
LINTER_ARGS = -j 4 --enable-gc --disable=errcheck --disable=gotype --deadline=10m --tests
.DEFAULT_GOAL: all
all: download lint test
check: test lint
.PHONY: download
download:
go get -t -d -v ./...
.PHONY: install-linter
install-linter:
go get -v -u github.com/alecthomas/gometalinter
gometalinter --install
.PHONY: test
test:
go test -v -coverprofile=cover.out
.PHONY: lint
lint: install-linter
gometalinter $(LINTER_ARGS) $(SOURCEDIR)
# Listing all the make targets; http://stackoverflow.com/a/26339924/983746
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'