-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/vet: cannot run 'go vet' on testdata files #25752
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
This also happen with the file from latest HEAD, see https://raw.githubusercontent.com/golang/go/2ce295e9542c104110a050bf809dd0a37e191eb7/src/cmd/vet/testdata/cgo/cgo.go |
I agree that this is inconsistent and a bit confusing. At the moment,
In particular, This is how However, the tests run
In the long run, once vet always requires type information, I would hope that its /cc @alandonovan @josharian in case I missed anything or said anything wrong. |
@mvdan is correct, and this is not a bug. The cmd/vet tests test the vet tool in standalone mode. There is no reason to make them work in the mode in which vet is invoked by the go tool. If someone wants to change the vet tests to work with |
What version of Go are you using (
go version
)?go version go1.10.2 windows/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?set GOHOSTARCH=amd64
set GOHOSTOS=windows
What did you do?
I ran
go vet
on the file here: https://raw.githubusercontent.com/golang/go/27fb26c77c0374ec1876223593078e4d6b98d4f0/src/cmd/vet/testdata/cgo/cgo.goWhat did you expect to see?
Vet errors as described by the comments
// ERROR "embedded pointer"
What did you see instead?
I've tried this on Linux as well as Windows. Same compile error and vet never has a chance to actually work. Do I miss anything here?
Thank you.
The text was updated successfully, but these errors were encountered: