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>
diff --git a/go/analysis/passes/printf/printf.go b/go/analysis/passes/printf/printf.go
index 4b761e2..80db95c 100644
--- a/go/analysis/passes/printf/printf.go
+++ b/go/analysis/passes/printf/printf.go
@@ -32,7 +32,7 @@
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 @@
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