forked from RichardKnop/go-oauth2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (23 loc) · 991 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
DEPS=go list -f '{{range .TestImports}}{{.}} {{end}}' ./...
update-deps:
rm -rf Godeps
rm -rf vendor
go get github.com/tools/godep
godep save ./...
install-deps:
go get github.com/tools/godep
godep restore
$(DEPS) | xargs -n1 go get -d
fmt:
bash -c 'go list ./... | grep -v vendor | xargs -n1 go fmt'
lint:
bash -c 'gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --tests --vendor ./...'
golint:
# TODO: When Go 1.9 is released vendor folder should be ignored automatically
bash -c 'go list ./... | grep -v vendor | grep -v mocks | xargs -n1 golint'
test:
# TODO: When Go 1.9 is released vendor folder should be ignored automatically
bash -c 'go list ./... | grep -v vendor | xargs -n1 go test -timeout=60s'
test-with-coverage:
# TODO: When Go 1.9 is released vendor folder should be ignored automatically
bash -c 'go list ./... | grep -v vendor | xargs -n1 go test -timeout=60s -coverprofile=coverage.txt -covermode=set'