Makefile 744 B

123456789101112131415161718192021222324252627282930
  1. BRANCH=`git rev-parse --abbrev-ref HEAD`
  2. COMMIT=`git rev-parse --short HEAD`
  3. GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)"
  4. default: build
  5. race:
  6. @go test -v -race -test.run="TestSimulate_(100op|1000op)"
  7. fmt:
  8. !(gofmt -l -s -d $(shell find . -name \*.go) | grep '[a-z]')
  9. # go get honnef.co/go/tools/simple
  10. gosimple:
  11. gosimple ./...
  12. # go get honnef.co/go/tools/unused
  13. unused:
  14. unused ./...
  15. # go get github.com/kisielk/errcheck
  16. errcheck:
  17. @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/coreos/bbolt
  18. test:
  19. go test -timeout 20m -v -coverprofile cover.out -covermode atomic
  20. # Note: gets "program not an importable package" in out of path builds
  21. go test -v ./cmd/bolt
  22. .PHONY: race fmt errcheck test gosimple unused