| default: fmt vet errcheck test lint |
| # Taken from https://github.com/codecov/example-go#caveat-multiple-files |
| for d in `go list ./...`; do \ |
| go test -p 1 -v -timeout 240s -race -coverprofile=profile.out -covermode=atomic $$d || exit 1; \ |
| if [ -f profile.out ]; then \ |
| cat profile.out >> coverage.txt; \ |
| GOLINT := $(shell command -v golint) |
| go get golang.org/x/lint/golint |
| go list ./... | xargs golint |
| ERRCHECK := $(shell command -v errcheck) |
| # See https://github.com/kisielk/errcheck/pull/141 for details on ignorepkg |
| go get github.com/kisielk/errcheck |
| errcheck -ignorepkg fmt github.com/Shopify/sarama/... |
| @if [ -n "$$(go fmt ./...)" ]; then echo 'Please run go fmt on your code.' && exit 1; fi |
| .PHONY : install_dependencies |
| install_dependencies: get |