blob: 8fcf219f448eb644113ff1525521d11ac824bd6b [file] [log] [blame]
khenaidooac637102019-01-14 15:44:34 -05001default: fmt vet errcheck test
2
3# Taken from https://github.com/codecov/example-go#caveat-multiple-files
4test:
5 echo "" > coverage.txt
6 for d in `go list ./... | grep -v vendor`; do \
7 go test -p 1 -v -timeout 240s -race -coverprofile=profile.out -covermode=atomic $$d || exit 1; \
8 if [ -f profile.out ]; then \
9 cat profile.out >> coverage.txt; \
10 rm profile.out; \
11 fi \
12 done
13
14vet:
15 go vet ./...
16
17# See https://github.com/kisielk/errcheck/pull/141 for details on ignorepkg
18errcheck:
19 errcheck -ignorepkg fmt github.com/Shopify/sarama/...
20
21fmt:
22 @if [ -n "$$(go fmt ./...)" ]; then echo 'Please run go fmt on your code.' && exit 1; fi
23
24install_dependencies: install_errcheck get
25
26install_errcheck:
27 go get github.com/kisielk/errcheck
28
29get:
30 go get -t