-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/vet: go vet failing on directory with no non-test files #23395
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
Comments
The best part is that it does run properly via
Looking into this, as I looked into another package loading bug recently. |
This bisects to 561786. |
@0xfaded yes - that is the line that swapped Edit: info above may be wrong, was too quick to jump to conclusions. |
This issue is trickier than I thought, as it involves the fairly new
I have tried multiple ways of skipping this error or this build step, but it just ends up with the vet step either erroring or doing nothing useful. There must be something that I'm going to let @rsc have a look, as he wrote all this code and will likely find the correct fix in no time. |
Change https://golang.org/cl/87636 mentions this issue: |
What version of Go are you using (
go version
)?go version devel +23aefcd9ae Wed Jan 10 00:00:40 2018 +0000 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
As part of my continuous build steps I run
go vet
on all my code.In order to do this I used to run
go list ./... | grep -v vendor | xargs go vet
.Until go1.9 this was working correctly but as you can see here it stopped working with go1.10.
What did you expect to see?
Running
go vet
in a directory with only the the test below should give ago vet
warning.What did you see instead?
The output is not a warning, but an error to load the package.
$ go vet go build github.com/campoy/test/foo: no non-test Go files in .../foo
The text was updated successfully, but these errors were encountered: