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/vet: false negative in vet -shadow #19597

mcandre opened this issue Mar 17, 2017 · 2 comments

cmd/vet: false negative in vet -shadow #19597

mcandre opened this issue Mar 17, 2017 · 2 comments


Copy link

@mcandre mcandre commented Mar 17, 2017

What version of Go are you using (go version)?

$ go version
go version go1.7 darwin/amd64

What did you do?

go tool vet -shadow finds one shadow for the hash variable, but fails to notice the password shadow.


Perhaps the shadow checker bombs out on the first occurrence, before it has a chance to scan the rest of the file?

@ALTree ALTree changed the title False negative in vet -shadow cmd/vet: false negative in vet -shadow Mar 18, 2017
@ALTree ALTree added this to the Unplanned milestone Mar 18, 2017
Copy link

@robpike robpike commented Mar 18, 2017

The shadow tool is very weak and has many known bugs. I'll leave this open but don't expect a fix. A likelier resolution is a complete replacement of the checker.

Copy link

@mvdan mvdan commented Sep 13, 2019

go vet has been rewritten since this issue was opened, and the shadow check is no longer available via a flag. It can still be installed, but manually from x/tools; see

Given that the check never made it out of the "experimental" phase, and that it's no longer part of vet, and that noone plans to fix this issue in particular, I'm closing it for now.

@mvdan mvdan closed this Sep 13, 2019
@golang golang locked and limited conversation to collaborators Sep 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants