Skip to content

Commit 0751f3a

Browse files
adonovangopherbot
authored andcommitted
doc/next: add release note for vet on Printf(s) with non-const s
Fixes #60529 Updates #68545 Change-Id: Ica048e4861f4de22deb7f42a1d76eb3151fee986 Reviewed-on: https://go-review.googlesource.com/c/go/+/631682 Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent cff2503 commit 0751f3a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/next/3-tools.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ tests, fuzzers, benchmarks, and examples in test packages, such as
2828
malformed names, incorrect signatures, or examples that document
2929
non-existent identifiers. Some of these mistakes may cause tests not
3030
to run.
31-
3231
This analyzer is among the subset of analyzers that are run by `go test`.
3332

33+
The existing `printf` analyzer now reports a diagnostic for calls of
34+
the form `fmt.Printf(s)`, where `s` is a non-constant format string,
35+
with no other arguments. Such calls are nearly always a mistake
36+
as the value of `s` may contain the `%` symbol; use `fmt.Print` instead.
37+
See [#60529](/issue/60529).
38+
3439
### GOCACHEPROG
3540

3641
The `cmd/go` internal binary and test caching mechanism can now be implemented

0 commit comments

Comments
 (0)