]> Cypherpunks repositories - gostls13.git/commit
cmd/vet: rewrite method check to use go/types
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 25 Aug 2018 10:33:12 +0000 (11:33 +0100)
committerAlan Donovan <adonovan@google.com>
Tue, 13 Nov 2018 18:11:58 +0000 (18:11 +0000)
commit62b850f1c50aa2532512085feb86cbe5d9c99581
tree8a443b0f3e745a69bd0c1aac0245b2c646c3a3a0
parent160ddf76e397557a4f05203e9c38ffd43365a65a
cmd/vet: rewrite method check to use go/types

Now that vet can rely on go/types, there's no reason to do extra work to
avoid using it. The rewrite lets us get rid of the field list flattening
code, as well as the slight verbosity that comes with go/printer.

While at it, make the testdata/method.go expected errors be more
specific, to make sure that we're not breaking the warnings that are
printed.

Finally, update whitelist/all.txt, since the reported errors now include
qualified types.

Change-Id: I760a1b3b1f60e4a478c9dc43bd7f584a8459593e
Reviewed-on: https://go-review.googlesource.com/c/148919
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/vet/all/whitelist/all.txt
src/cmd/vet/method.go
src/cmd/vet/testdata/method.go