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

Comments

Projects
None yet
4 participants
@dsymonds
Copy link
Member

commented Aug 26, 2013

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

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2013

Comment 1:

Labels changed: added go1.3maybe.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 3:

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

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 4:

Labels changed: added repo-tools.

@robpike

This comment has been minimized.

Copy link
Contributor

commented Mar 4, 2014

Comment 5:

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

Status changed to Fixed.

@dsymonds dsymonds added fixed labels Mar 4, 2014

@golang golang locked and limited conversation to collaborators Jun 25, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.