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: check for verb errors for fmt.Scanf #8170

Open
jcrubino opened this Issue Jun 8, 2014 · 2 comments

Comments

Projects
None yet
5 participants
@jcrubino

jcrubino commented Jun 8, 2014

What does 'go version' print?
go version go1.2.2 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. Printf("test %d", f) where f is float is deemed a type error
2. Scanf("test %d", f) where f is float passes all type checking
3. http://play.golang.org/p/3OkpJ-RQeU
4. code sample will compile and pass go vet but fail at runtime

What happened?
Simple demo program using fmt.Scanf compiles  and passes go vet check but error found at
runtime.  Analogous program using fmt.Printf with same error does not pass go vet check.

What should have happened instead?
go vet should produce similar checks in fmt.Scanf as is does for fmt.Printf

Please provide any additional information below.
@minux

This comment has been minimized.

Member

minux commented Jun 8, 2014

Comment 1:

Labels changed: added release-go1.4, repo-tools.

Status changed to Accepted.

@rsc

This comment has been minimized.

Contributor

rsc commented Sep 15, 2014

Comment 2:

Probably too much for right now, but a good idea.

Labels changed: added release-go1.5, removed release-go1.4.

@bradfitz bradfitz modified the milestone: Go1.5 Dec 16, 2014

@bradfitz bradfitz removed the release-go1.5 label Dec 16, 2014

@robpike robpike self-assigned this Jan 6, 2015

@rsc rsc removed accepted labels Apr 14, 2015

@rsc rsc changed the title from cmd/vet: check for verb errors for fmt.Scanf to x/tools/cmd/vet: check for verb errors for fmt.Scanf Apr 14, 2015

@rsc rsc modified the milestones: Unreleased, Go1.5 Apr 14, 2015

@rsc rsc removed the repo-tools label Apr 14, 2015

@mvdan mvdan changed the title from x/tools/cmd/vet: check for verb errors for fmt.Scanf to cmd/vet: check for verb errors for fmt.Scanf May 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment