From 1359f7f3918befd2463103379d17bd2eb846654d Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 9 Feb 2017 13:39:15 -0800 Subject: 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 --- Makefile | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3-1-g7c22