Makefile: add a target to run tests

For now, just vet and lint. But would like to include the commit
validator, once a good range is selectable.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-01-07 15:32:06 -05:00
parent 52cbf479f2
commit 70e725cedd
1 changed files with 17 additions and 0 deletions

View File

@ -17,6 +17,7 @@ DOC_FILES := \
glossary.md
docs: pdf html
.PHONY: docs
pdf:
@mkdir -p output/ && \
@ -40,6 +41,22 @@ html:
vbatts/pandoc -f markdown_github -t html5 -o /output/docs.html $(patsubst %,/input/%,$(DOC_FILES)) && \
ls -sh $(shell readlink -f output/docs.html)
.PHONY: test .govet .golint .gitvalidation
test: .govet .golint
# `go get golang.org/x/tools/cmd/vet`
.govet:
go vet -x ./...
# `go get github.com/golang/lint/golint`
.golint:
golint ./...
# `go get github.com/vbatts/git-validation`
.gitvalidation:
git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE}
clean:
rm -rf output/ *~