go/analysis/passes/printf: actually use doc constant

Change-Id: If33697d77a86e4b29089f3a1ba096477a34062be
Reviewed-on: https://go-review.googlesource.com/c/149740
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Alan Donovan 2018-11-15 09:29:40 -05:00
parent 2a3f5192be
commit 29e82b56d9
1 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ func init() {
var Analyzer = &analysis.Analyzer{
Name: "printf",
Doc: "check printf-like invocations",
Doc: doc,
Requires: []*analysis.Analyzer{inspect.Analyzer},
Run: run,
FactTypes: []analysis.Fact{new(isWrapper)},
@ -43,12 +43,12 @@ const doc = `check consistency of Printf format strings and arguments
The check applies to known functions (for example, those in package fmt)
as well as any detected wrappers of known functions.
A function that wants to avail itself of printf checking but does not
get found by this analyzer's heuristics (for example, due to use of
A function that wants to avail itself of printf checking but is not
found by this analyzer's heuristics (for example, due to use of
dynamic calls) can insert a bogus call:
if false {
fmt.Sprintf(format, args...) // enable printf checking
_ = fmt.Sprintf(format, args...) // enable printf checking
}
The -funcs flag specifies a comma-separated list of names of additional