Skip to content

Commit

Permalink
_content/doc/go1.24.md: update printf analyzer documentation
Browse files Browse the repository at this point in the history
Update the documentation for the new printf analyzer check, now that it
only applies to 1.24 code.

Change-Id: I92e718c52a6faaec7fc74b7763de295184430935
Reviewed-on: https://go-review.googlesource.com/c/website/+/646235
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
  • Loading branch information
findleyr committed Feb 3, 2025
1 parent 9d27ca2 commit 9a10724
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _content/doc/go1.24.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ The existing `printf` analyzer now reports a diagnostic for calls of
the form `fmt.Printf(s)`, where `s` is a non-constant format string,
with no other arguments. Such calls are nearly always a mistake
as the value of `s` may contain the `%` symbol; use `fmt.Print` instead.
See [#60529](/issue/60529).
See [#60529](/issue/60529). This check tends to produce findings in existing
code, and so is only applied when the language version (as specified by the
go.mod `go` directive or `//go:build` comments) is at least Go 1.24, to avoid
causing continuous integration failures when updating to the 1.24 Go toolchain.

<!-- go.dev/issue/64127 -->
The existing `buildtag` analyzer now reports a diagnostic when
Expand Down

0 comments on commit 9a10724

Please sign in to comment.