Skip to content

Commit eac1cc9

Browse files
committed
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 <[email protected]>
1 parent 6a6ba67 commit eac1cc9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ DOC_FILES := \
1616
glossary.md
1717

1818
docs: pdf html
19+
.PHONY: docs
1920

2021
pdf:
2122
@mkdir -p output/ && \
@@ -39,6 +40,22 @@ html:
3940
vbatts/pandoc -f markdown_github -t html5 -o /output/docs.html $(patsubst %,/input/%,$(DOC_FILES)) && \
4041
ls -sh $(shell readlink -f output/docs.html)
4142

43+
.PHONY: test .govet .golint .gitvalidation
44+
45+
test: .govet .golint
46+
47+
# `go get golang.org/x/tools/cmd/vet`
48+
.govet:
49+
go vet -x ./...
50+
51+
# `go get github.com/golang/lint/golint`
52+
.golint:
53+
golint ./...
54+
55+
# `go get github.com/vbatts/git-validation`
56+
.gitvalidation:
57+
git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE}
58+
4259
clean:
4360
rm -rf output/ *~
4461

0 commit comments

Comments
 (0)