Add make check-style to travis

This commit is contained in:
Hanzei 2018-10-12 13:38:41 +02:00
parent fbdb357823
commit 0f51dc026e
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
2 changed files with 4 additions and 3 deletions

View file

@ -6,4 +6,5 @@ install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
script:
- make check-style
- make test

View file

@ -28,7 +28,7 @@ endif
gofmt:
ifneq ($(HAS_SERVER),)
@echo Running GOFMT
@echo Running gomft
@for package in $$(go list ./server/...); do \
echo "Checking "$$package; \
files=$$(go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' $$package); \
@ -36,12 +36,12 @@ ifneq ($(HAS_SERVER),)
gofmt_output=$$(gofmt -d -s $$files 2>&1); \
if [ "$$gofmt_output" ]; then \
echo "$$gofmt_output"; \
echo "gofmt failure"; \
echo "Gofmt failure"; \
exit 1; \
fi; \
fi; \
done
@echo "gofmt success";
@echo Gofmt success
endif
# server/.depensure ensures the server dependencies are installed