-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: list default vet flags in go test -help #26786
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
You have written this bug report to say that |
I'll add that one way to help determine whether this would be a good idea would be to run |
It all started by speeding up a local build by removing vet during test in |
I'm afraid there may exist tests using build tags causing unreachable code. I like go vet and I do use it, but I don't agree with it now being used as a non negotiable authority deciding if someone may or may not actually run |
@cznic Yes, that is why we must be very conservative in adding additional vet checks. Although |
I believe that the origin of my issue is that go test, even in verbose mode, does not display the flags that it passes to vet. I suggest to re-title with something like "go test verbose should display passed vet flags". |
|
Documentation about I ran the flag on the example above and
To avoid disrupting scripts treating test results, I suggest to change the behavior of
Into the list of flags passed to vet like |
|
Probably we should just list the default vet flags in the output of |
Fine by me. I looked around but could not locate where the help text is built to submit a related update. |
It's |
Change https://golang.org/cl/130715 mentions this issue: |
|
Thanks, closing. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.11beta2 windows/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?
This code trips go vet:
A standard test like
Of course, vet detects the issue correctly
What did you expect to see?
What did you see instead?
The flag behavior is correct.
Go vet behaves normally. The doc on go test flags states:
The present "curated" list seems empty but I did not try to locate it.
I supposed that unreachable code would be a prime choice for a curated list.
Behavior seems to contradict the current documentation of go test flags.
The text was updated successfully, but these errors were encountered: