Commit 4c0cac64 authored by Eric Chiang's avatar Eric Chiang Committed by GitHub

Merge pull request #1064 from ericchiang/gofmt-fix

Makefile: error out if go files aren't correctly formatted
parents 38d0de20 980400db
...@@ -51,7 +51,7 @@ vet: ...@@ -51,7 +51,7 @@ vet:
@go vet $(shell go list ./... | grep -v '/vendor/') @go vet $(shell go list ./... | grep -v '/vendor/')
fmt: fmt:
@go fmt $(shell go list ./... | grep -v '/vendor/') @./scripts/gofmt $(shell go list ./... | grep -v '/vendor/')
lint: lint:
@for package in $(shell go list ./... | grep -v '/vendor/' | grep -v '/api' | grep -v '/server/internal'); do \ @for package in $(shell go list ./... | grep -v '/vendor/' | grep -v '/api' | grep -v '/server/internal'); do \
......
...@@ -503,13 +503,13 @@ func (c *githubConnector) userEmail(ctx context.Context, client *http.Client) (s ...@@ -503,13 +503,13 @@ func (c *githubConnector) userEmail(ctx context.Context, client *http.Client) (s
advised them not to check for verified emails advised them not to check for verified emails
(https://circleci.com/enterprise/changelog/#1-47-1). (https://circleci.com/enterprise/changelog/#1-47-1).
In addition, GitHub Enterprise support replied to a support In addition, GitHub Enterprise support replied to a support
ticket with "There is no way to verify an email address in ticket with "There is no way to verify an email address in
GitHub Enterprise." GitHub Enterprise."
*/ */
if c.hostName != "" { if c.hostName != "" {
email.Verified = true email.Verified = true
} }
if email.Verified && email.Primary { if email.Verified && email.Primary {
return email.Email, nil return email.Email, nil
} }
......
#!/bin/bash -e
result=$( go fmt $@ )
if [[ $result != "" ]]; then
>&2 echo "The following files are not formatted correctly: $result"
exit 1
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment