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

Closed
mcandre opened this issue Mar 17, 2017 · 2 comments
Closed

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

mcandre opened this issue Mar 17, 2017 · 2 comments

Comments

@mcandre
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.

Source:

https://github.com/mcandre/go-ios7crypt/blob/61a282b2d8003e9372cbe37449c7008ee142f1fa/cmd/ios7crypt/main.go#L29-L43

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
@robpike

This comment has been minimized.

Copy link
Contributor

@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.

@mvdan

This comment has been minimized.

Copy link
Member

@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 https://go-review.googlesource.com/c/go/+/154584/.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.