diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..05fcf20 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +all: + @echo 'Available targets:' + @echo ' make test' + +test: static-tests cover.html + +static-tests: FORCE + @echo '>> gofmt...' + @if s="$$(gofmt -s -l $$(find -name \*.go) 2>/dev/null)" && test -n "$$s"; then echo "$$s"; false; fi + @echo '>> golint...' + @if s="$$(golint ./... 2>/dev/null)" && test -n "$$s"; then echo "$$s"; false; fi + @echo '>> govet...' + @go vet ./... + +cover.out: FORCE + @echo '>> go test...' + @go test -cover -coverprofile $@ +cover.html: cover.out + @echo '>> rendering cover.html...' + @go tool cover -html=$< -o $@ + +.PHONY: FORCE |
