-
Notifications
You must be signed in to change notification settings - Fork 18.1k
cmd/vet: printf checker does not know about fmt.Formatter #17057
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
Labels
Milestone
Comments
When this is fixed, we should revert CL 28959. |
gopherbot
pushed a commit
that referenced
this issue
Sep 10, 2016
This is a temporary measure to work around #17057. It will be reverted when #17057 is fixed. Change-Id: I21c02f63f3530774c91065cfed5d9c566839ed9f Reviewed-on: https://go-review.googlesource.com/28959 Reviewed-by: Rob Pike <[email protected]>
CL https://golang.org/cl/32851 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Nov 13, 2016
Updates #17057. Change-Id: I54c838d3a44007d4023754e42971e91bfb5e8612 Reviewed-on: https://go-review.googlesource.com/32851 Run-TryBot: Rob Pike <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Rob Pike <[email protected]>
CL https://golang.org/cl/33166 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Nov 13, 2016
This reverts commit f15915a. CL 32851 fixed cmd/vet's handling of fmt.Formatter. Updates #17057. Change-Id: I3409100d16037645946fe7fe78fbb173e1648494 Reviewed-on: https://go-review.googlesource.com/33166 Run-TryBot: Josh Bleecher Snyder <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
The printf checker should allow any verb for a value that implements fmt.Formatter. It does not.
As an aside, it looks like the implementation of fmt.Stringer detection in cmd/vet could be simplified by using go/types-based interface satisfaction analysis. (See the copylock check for an example.) I suspect the printf check was written before go/types had that functionality.
cc @valyala @robpike
The text was updated successfully, but these errors were encountered: