Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: running go build ./... returns an exit code of 0 even if there are compile errors #11407

Closed
alexflint opened this issue Jun 25, 2015 · 5 comments
Milestone

Comments

@alexflint
Copy link

version: go version go1.4 darwin/amd64

operating system: OSX 10.10.2

Running go build ./... returns an exit code of 0 even if there are compile errors. For example, running go build ./... in a directory containing a single file that contains parse errors:

$ go build ./...
... build errors ...
$ echo $?
0

This does not, however, happen when simply running go build .:

$ go build .
... build errors ...
$ echo $?
1
@adg adg changed the title Running go build ./... returns an exit code of 0 even if there are compile errors cmd/go: running go build ./... returns an exit code of 0 even if there are compile errors Jun 26, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jul 11, 2015
prashantv added a commit to uber/tchannel-go that referenced this issue Dec 2, 2015
go build ./... was not returning an error status code on compile
failure:
golang/go#11407

Check the output since go build has no output when successul.
prashantv added a commit to uber/tchannel-go that referenced this issue Dec 2, 2015
go build ./... returns an exit status code of 0 even on failure:
golang/go#11407

Check the output since go build has no output when successul.
@rsc
Copy link
Contributor

rsc commented Dec 17, 2015

Running go build ./... reports the parse errors while evaluating the wildcard ./.... The rule for wildcards is to ignore directories without Go source code or for which the Go source code is malformed. Maybe that's a mistake.

@gopherbot
Copy link

CL https://golang.org/cl/17971 mentions this issue.

@rsc rsc closed this as completed in ab74f59 Dec 18, 2015
@xjewer
Copy link

xjewer commented Jun 10, 2016

what aboult go test ./... ?

@davecheney
Copy link
Contributor

@xjewer this issue is closed, please try go 1.7beta1 and open a new issue if necessary.

@xjewer
Copy link

xjewer commented Jun 10, 2016

my bad, go test ./... work properly 👌

@golang golang locked and limited conversation to collaborators Jun 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants