Makefile 269 B

123456789101112
  1. PACKAGES ?= $(shell go list ./...)
  2. .PHONY: check
  3. check: lint
  4. go test
  5. .PHONY: lint
  6. lint:
  7. @which golint > /dev/null; if [ $$? -ne 0 ]; then \
  8. go get -u github.com/golang/lint/golint; \
  9. fi
  10. @for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;