Closed
Description
The printf checker reports a diagnostic for calls like this:
fmt.Print("hello, %s") // "%s call has possible Printf formatting directive %s"
(Aside: though it's easy to conceive of false positives for this heuristic, in practice it seems to be very reliable.)
In Google issue 302359716, a number of users tell us that the message makes them think the problem is in the format string, when really it's in the choice of formatting function. Perhaps the error message could give them a hint:
fmt.Print("hello, %s") // "fmt.Print call has possible formatting directive %s; use fmt.Printf(...) or fmt.Printf("%s", ...)"
The error message could vary depending on whether the corresponding 'f' variant function exists. The main challenge is deciding the exact wording; these messages have been agonized over for a decade.