-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
31 lines (21 loc) · 634 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
.PHONY: all
PKGS := $(shell go list ./... | grep -v '/vendor/')
GOFILES := $(shell go list -f '{{range $$index, $$element := .GoFiles}}{{$$.Dir}}/{{$$element}}{{"\n"}}{{end}}' ./... | grep -v '/vendor/')
TXT_FILES := $(shell find * -type f -not -path 'vendor/**')
default: clean misspell checks lint test build
test: clean
go test -v -cover $(PKGS)
clean:
rm -f cover.out
build:
go build
lint:
golint -set_exit_status $(PKGS)
checks: check-fmt
staticcheck $(PKGS)
gosimple $(PKGS)
check-fmt: SHELL := /bin/bash
check-fmt:
diff -u <(echo -n) <(gofmt -d $(GOFILES))
misspell:
misspell -source=text -error $(TXT_FILES)