cmd/vet: printf checker does not know about fmt.Formatter #17057
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 <r@golang.org>
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 <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org>
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 <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: