Add make check-style to travis
This commit is contained in:
parent
fbdb357823
commit
0f51dc026e
2 changed files with 4 additions and 3 deletions
|
@ -6,4 +6,5 @@ install:
|
|||
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||||
|
||||
script:
|
||||
- make check-style
|
||||
- make test
|
||||
|
|
6
Makefile
6
Makefile
|
@ -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
|
||||
|
|
Reference in a new issue