tools/go/analysis/passes
Alan Donovan f62bfb5415 go/analysis/passes/printf: fix regression in "recursive stringer" logic
The recursive stringer check should report cases such as

   func (x T) String() string { return fmt.Sprint(x) }

in which the receiver x (or possibly &x) was passed into a fmt print call.
However, in translating it from the go/ast to the go/types representation,
I inadvertently made it report any situation in which a value of type T
was passed to fmt, even when the value is not x, as in:

   func (cons *cons) String() string {
	... fmt.Sprint(cons.cdr) ...
   }

Fixed and tested.

Change-Id: I57e88755c9989deaaad45cc306a604f3db4ee269
Reviewed-on: https://go-review.googlesource.com/c/149616
Reviewed-by: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
2018-11-15 16:22:56 +00:00
..
asmdecl go/analysis/passes/asmdecl: turn two diagnostics into log messages 2018-11-14 16:30:01 +00:00
assign go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
atomic go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
bools go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
buildssa go/analysis/passes/nilness: degenerate nil condition checker 2018-10-19 00:59:45 +00:00
buildtag go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
cgocall go/analysis/passes/cgocall: fix typo in comment 2018-11-08 19:46:55 +00:00
composite go/analysis/passes/composite: add testing.Internal* to whitelist 2018-10-17 15:12:46 +00:00
copylock go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
ctrlflow go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
findcall go/analysis/cmd/analyze: install all analyzers 2018-10-19 17:03:54 +00:00
httpresponse go/analysis/passes/httpresponse: split out from vet 2018-10-16 19:47:10 +00:00
inspect go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
internal/analysisutil go/analysis/passes/assign: split out from vet 2018-10-08 20:59:24 +00:00
loopclosure go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
lostcancel cmd/vet: lostcancel: suppress the check in the main.main function 2018-11-09 18:25:37 +00:00
nilfunc go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
nilness go/analysis/passes/nilness: degenerate nil condition checker 2018-10-19 00:59:45 +00:00
pkgfact go/analysis/internal/unitchecker: a 'go vet'-compatible driver 2018-11-02 17:49:05 +00:00
printf go/analysis/passes/printf: fix regression in "recursive stringer" logic 2018-11-15 16:22:56 +00:00
shadow go/analysis/passes/shadow: add shadow command 2018-11-08 22:19:41 +00:00
shift go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
stdmethods go/analysis/passes/stdmethods: show p.T not dir/p.T in diagnostic 2018-11-14 16:30:30 +00:00
structtag go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
tests go/analysis/passes/tests: add testcase from vet 2018-10-19 16:56:12 +00:00
unmarshal go/analysis/passes/unmarshal: port vet's unmarshal checker 2018-11-09 14:28:11 +00:00
unreachable go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
unsafeptr go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
unusedresult go/analysis/passes: add doc and copyright comments 2018-10-16 20:28:15 +00:00
README go/analysis/internal/checker: analysis driver based on go/packages 2018-09-26 01:25:07 +00:00

README

This directory does not contain a Go package,
but acts as a container for various analyses
that implement the golang.org/x/tools/go/analysis
API and may be imported into an analysis tool.

By convention, each package foo provides the analysis,
and each command foo/cmd/foo provides a standalone driver.