summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-02-09 13:39:15 -0800
committerGeorge Goldberg <george@gberg.me>2017-02-09 21:39:15 +0000
commit1359f7f3918befd2463103379d17bd2eb846654d (patch)
treef8fe7cbfd7b8a59da7a655f7ac7bbc9233a70258 /Makefile
parent432dc9239fdd27063adcee944675d066fb35cde6 (diff)
downloadchat-1359f7f3918befd2463103379d17bd2eb846654d.tar.gz
chat-1359f7f3918befd2463103379d17bd2eb846654d.tar.bz2
chat-1359f7f3918befd2463103379d17bd2eb846654d.zip
Adding go vet from hack-a-thon (#5328)
* Adding go vet to the api package * Adding go vet to app package * Adding go vet to manualtesting package * Adding go vet to the model package * Adding go vet to the store dir * Adding go vet to utils package * Adding missing dirs with go files * Fixing up makefile * Fixing up makefile * Removing root dir
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 32 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e47237795..c99767a3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: build package run stop run-client run-server stop-client stop-server restart restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist setup-mac prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows internal-test-client
+.PHONY: build package run stop run-client run-server stop-client stop-server restart restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist setup-mac prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows internal-test-client vet
# For golang 1.5.x compatibility (remove when we don't want to support it anymore)
export GO15VENDOREXPERIMENT=1
@@ -183,7 +183,7 @@ check-client-style:
cd $(BUILD_WEBAPP_DIR) && $(MAKE) check-style
-check-server-style:
+check-server-style: govet
@echo Running GOFMT
$(eval GOFMT_OUTPUT := $(shell gofmt -d -s api/ model/ store/ utils/ manualtesting/ einterfaces/ cmd/platform/ 2>&1))
@echo "$(GOFMT_OUTPUT)"
@@ -467,6 +467,36 @@ nuke: clean clean-docker
setup-mac:
echo $$(boot2docker ip 2> /dev/null) dockerhost | sudo tee -a /etc/hosts
+govet:
+ @echo Running GOVET
+
+ $(GO) vet $(GOFLAGS) ./api || exit 1
+ $(GO) vet $(GOFLAGS) ./api4 || exit 1
+ $(GO) vet $(GOFLAGS) ./app || exit 1
+ $(GO) vet $(GOFLAGS) ./cmd/platform || exit 1
+ $(GO) vet $(GOFLAGS) ./einterfaces || exit 1
+ $(GO) vet $(GOFLAGS) ./manualtesting || exit 1
+ $(GO) vet $(GOFLAGS) ./model || exit 1
+ $(GO) vet $(GOFLAGS) ./model/gitlab || exit 1
+ $(GO) vet $(GOFLAGS) ./store || exit 1
+ $(GO) vet $(GOFLAGS) ./utils || exit 1
+ $(GO) vet $(GOFLAGS) ./web || exit 1
+
+ifeq ($(BUILD_ENTERPRISE_READY),true)
+ $(GO) vet $(GOFLAGS) ./enterprise || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/account_migration || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/brand || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/cluster || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/compliance || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/emoji || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/ldap || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/metrics || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/mfa || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/oauth/google || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/oauth/office365 || exit 1
+ $(GO) vet $(GOFLAGS) ./enterprise/saml || exit 1
+endif
+
todo:
@ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ TODO
@ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime --ignore-dir webapp/non_npm_dependencies/ XXX