tools/go/analysis
Daniel Martí b6b7807791 go/analysis: make stdmethods happy on encoding/xml
Historically, vet had always been unhappy about encoding/xml itself:

	method MarshalXML(e *xml.Encoder, start xml.StartElement) error should
		have signature MarshalXML(*xml.Encoder, xml.StartElement) error

This dates back to the time when vet couldn't depend on type
information. It compared the type expressions directly as strings, which
was a problem when the code was in encoding/xml itself. There, the
function parameters are *Encoder and StartElement, not *xml.Encoder and
xml.StartElement.

However, vet has been depending on type information for a while, so this
restriction no longer makes sense. The analyzer almost got it right, but
the only stopgap was a piece of the old code that tried to compare type
expression strings.

Remove it; typeString already deals with these edge cases for us. To
ensure vet remains happy with encoding/xml, add a very simple test for
it. The package now has zero reports, so the fact that its source has
zero "// want" comments is appropriate.

Finally, remove some long unused parameters from matchParamType.

Change-Id: Iab3ed57da7bc4a80522ae21e62b67e7828b97c89
Reviewed-on: https://go-review.googlesource.com/c/tools/+/168058
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2019-03-20 16:06:34 +00:00
..
analysistest go/analysis/analysistest: change error message checked in expectation 2019-02-12 19:41:11 +00:00
cmd/vet Revert "cmd/vet: add deepequalerrors" 2019-03-05 01:09:23 +00:00
internal go/analysis: allow overriding V flag without code patches 2019-02-20 15:01:58 +00:00
multichecker go/analysis/unitchecker: a main function for vet-lite tools 2018-11-15 16:00:22 +00:00
passes go/analysis: make stdmethods happy on encoding/xml 2019-03-20 16:06:34 +00:00
singlechecker go/analysis/singlechecker: use Stderr in flag.Usage 2019-02-14 16:35:53 +00:00
unitchecker go/analysis/unitchecker: rewrite test in terms of packagestest 2019-02-13 22:38:15 +00:00
analysis.go go/{analysis,packages}: add TypesSizes 2019-01-17 19:41:23 +00:00
doc.go go/analysis: fix typos and update documentation 2019-01-11 18:03:38 +00:00
validate.go go/analysis: validate: report duplicates among analyzers (roots) 2018-10-11 19:55:00 +00:00