diff options
author | Chris <ccbrown112@gmail.com> | 2017-08-09 15:35:49 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-09 13:35:49 -0700 |
commit | ff0811e4a4f5189293b54a1d195eaec30b3e530f (patch) | |
tree | 70cd535da2ed1c262e8bfc8ed37096a513bdcfab /Makefile | |
parent | 9309ad9d7a4684440234989f658c66bae3c1052f (diff) | |
download | chat-ff0811e4a4f5189293b54a1d195eaec30b3e530f.tar.gz chat-ff0811e4a4f5189293b54a1d195eaec30b3e530f.tar.bz2 chat-ff0811e4a4f5189293b54a1d195eaec30b3e530f.zip |
lint all the things (#7154)
* lint all the things
* remove extra echo
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 53 |
1 files changed, 16 insertions, 37 deletions
@@ -209,14 +209,20 @@ check-client-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)" - @if [ ! "$(GOFMT_OUTPUT)" ]; then \ - echo "gofmt success"; \ - else \ - echo "gofmt failure"; \ - exit 1; \ - fi + + @for package in $(TE_PACKAGES) $(EE_PACKAGES); do \ + echo "Checking "$$package; \ + files=$$(go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' $$package); \ + if [ "$$files" ]; then \ + gofmt_output=$$(gofmt -d -s $$files 2>&1); \ + if [ "$$gofmt_output" ]; then \ + echo "$$gofmt_output"; \ + echo "gofmt failure"; \ + exit 1; \ + fi; \ + fi; \ + done + @echo "gofmt success"; \ check-style: check-client-style check-server-style @@ -535,37 +541,10 @@ setup-mac: 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) ./app/plugin || exit 1 - $(GO) vet $(GOFLAGS) ./app/plugin/jira || exit 1 - $(GO) vet $(GOFLAGS) ./cmd/platform || exit 1 - $(GO) vet $(GOFLAGS) ./einterfaces || exit 1 - $(GO) vet $(GOFLAGS) ./jobs || 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 + $(GO) vet $(GOFLAGS) $(TE_PACKAGES) || exit 1 ifeq ($(BUILD_ENTERPRISE_READY),true) - $(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/data_retention || exit 1 - $(GO) vet $(GOFLAGS) ./enterprise/elasticsearch || exit 1 - $(GO) vet $(GOFLAGS) ./enterprise/emoji || exit 1 - $(GO) vet $(GOFLAGS) ./enterprise/imports || 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 + $(GO) vet $(GOFLAGS) $(EE_PACKAGES) || exit 1 endif todo: |