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: incorrect error for multiple missing arguments #6248

Closed
dsymonds opened this issue Aug 26, 2013 · 4 comments
Closed

cmd/vet: incorrect error for multiple missing arguments #6248

dsymonds opened this issue Aug 26, 2013 · 4 comments

Comments

@dsymonds
Copy link
Contributor

When there's more than one argument missing, the message miscounts the number of
required arguments. For instance, add this to testdata/print.go:
  Printf("%s %d %v %q", "str", 4) // ERROR "missing argument for Printf verb %v: need 4, have 2"

vet flags an issue with the %v, but says "need 3, have 2" because it is
progressively checking the Printf call instead of parsing the entire format first, and
checking the correspondence second.
@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 1:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added repo-tools.

@robpike
Copy link
Contributor

robpike commented Mar 4, 2014

Comment 5:

This issue was closed by revision golang/tools@31c219b.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned robpike Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants