summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-17 09:01:33 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-17 09:07:37 -0400
commiteb4b80a4845a738f5a1e84504a31f6f54bc4fe92 (patch)
tree16be9e1aee46244245cc9034ccee0b306e77ba9c /Makefile
parente644b53b72d346539f5c58cc0cb0a07c4054cbcb (diff)
downloadchat-eb4b80a4845a738f5a1e84504a31f6f54bc4fe92.tar.gz
chat-eb4b80a4845a738f5a1e84504a31f6f54bc4fe92.tar.bz2
chat-eb4b80a4845a738f5a1e84504a31f6f54bc4fe92.zip
Adding gofmt to travis build
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index cd82c27a3..972ebe960 100644
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,15 @@ travis:
@echo Checking for style guide compliance
cd web/react && $(ESLINT) --quiet components/* dispatcher/* pages/* stores/* utils/*
+ @echo Running gofmt
+ $(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ mattermost.go 2>&1))
+ @echo "$(GOFMT_OUTPUT)"
+ @if [ ! "$(GOFMT_OUTPUT)" ]; then \
+ echo "gofmt sucess"; \
+ else \
+ echo "gofmt failure"; \
+ exit 1; \
+ fi
@$(GO) build $(GOFLAGS) ./...
@$(GO) install $(GOFLAGS) ./...
@@ -108,6 +117,15 @@ install:
check: install
@echo Running ESLint...
-cd web/react && $(ESLINT) components/* dispatcher/* pages/* stores/* utils/*
+ @echo Running gofmt
+ $(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ mattermost.go 2>&1))
+ @echo "$(GOFMT_OUTPUT)"
+ @if [[ ! "$(GOFMT_OUTPUT)" ]]; then \
+ echo "gofmt sucess"; \
+ else \
+ echo "gofmt failure"; \
+ exit 1; \
+ fi
test: install
@mkdir -p logs