mirror of https://github.com/mpolden/echoip
Add format check and megacheck to build
This commit is contained in:
parent
2b22328c8c
commit
266f337c97
15
Makefile
15
Makefile
|
@ -3,7 +3,7 @@ ifeq ($(OS),Linux)
|
||||||
TAR_OPTS := --wildcards
|
TAR_OPTS := --wildcards
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: deps test vet install
|
all: deps lint test install
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
go fmt ./...
|
go fmt ./...
|
||||||
|
@ -14,6 +14,19 @@ test:
|
||||||
vet:
|
vet:
|
||||||
go 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:
|
deps:
|
||||||
go get -d -v ./...
|
go get -d -v ./...
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue