Add format check and megacheck to build

This commit is contained in:
Martin Polden 2018-06-28 17:39:45 +02:00
parent 2b22328c8c
commit 266f337c97
1 changed files with 14 additions and 1 deletions

View File

@ -3,7 +3,7 @@ ifeq ($(OS),Linux)
TAR_OPTS := --wildcards
endif
all: deps test vet install
all: deps lint test install
fmt:
go fmt ./...
@ -14,6 +14,19 @@ test:
vet:
go vet ./...
megacheck:
ifdef TRAVIS
megacheck 2> /dev/null; if [ $$? -eq 127 ]; then \
go get -v honnef.co/go/tools/cmd/megacheck; \
fi
megacheck ./...
endif
check-fmt:
bash -c "diff -u <(echo -n) <(gofmt -d -s .)"
lint: check-fmt vet megacheck
deps:
go get -d -v ./...