2016-04-02 00:44:30 +03:00
|
|
|
.PHONY: all deps test validate lint
|
2016-01-29 20:45:37 +03:00
|
|
|
|
|
|
|
all: deps test validate
|
|
|
|
|
|
|
|
deps:
|
|
|
|
go get -t ./...
|
|
|
|
go get github.com/golang/lint/golint
|
|
|
|
|
|
|
|
test:
|
2016-03-08 07:55:26 +03:00
|
|
|
go test -race -cover ./...
|
2016-01-29 20:45:37 +03:00
|
|
|
|
2016-04-02 00:44:30 +03:00
|
|
|
validate: lint
|
2016-01-29 20:45:37 +03:00
|
|
|
go vet ./...
|
|
|
|
test -z "$(gofmt -s -l . | tee /dev/stderr)"
|
2016-04-02 00:44:30 +03:00
|
|
|
|
|
|
|
lint:
|
|
|
|
out="$$(golint ./...)"; \
|
|
|
|
if [ -n "$$(golint ./...)" ]; then \
|
|
|
|
echo "$$out"; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|