1.PHONY: setup
2setup:
3	go get -u gopkg.in/alecthomas/gometalinter.v1
4	gometalinter.v1 --install
5
6.PHONY: test
7test: validate lint
8	@echo "==> Running tests"
9	go test -v
10
11.PHONY: validate
12validate:
13	@echo "==> Running static validations"
14	@gometalinter.v1 \
15	  --disable-all \
16	  --enable deadcode \
17	  --severity deadcode:error \
18	  --enable gofmt \
19	  --enable gosimple \
20	  --enable ineffassign \
21	  --enable misspell \
22	  --enable vet \
23	  --tests \
24	  --vendor \
25	  --deadline 60s \
26	  ./... || exit_code=1
27
28.PHONY: lint
29lint:
30	@echo "==> Running linters"
31	@gometalinter.v1 \
32	  --disable-all \
33	  --enable golint \
34	  --vendor \
35	  --deadline 60s \
36	  ./... || :
37