go/go
Michael Matloob 49b340b352 go/analysis: update tests for different go list error behavior
golang.org/cl/437298 updates go list to not exit with a non-zero
error code in some cases and instead place the error on the Package
struct. Also, as a cleanup, some places where exit status 2 was returned
will return exit status 1 (bringing it in line with other errors
returned by the go command).

TestEncodeDecode in facts_test.go has been updated to fix a missing
function body that is not relevant to the test, but that was causing an
error because the Package struct now has an error on it.

TestRunDespiteErrors in checker_test.go has been updated to reflect that
in some cases an analysis with RunDespiteErrors will fail to run because
a build error returned by go list when it's run to get export data is
not recognized as being a parse/typechecker error (the kind of error
allowed by TestRunDespiteError).

TestIntegration in unitchecker_test.go has been updated to reflect that
go vet running unitchecker will now fail with exit status 1 instead of 2
(so it just checks for a zero or non-zero status).

For golang/go#25842

Change-Id: Idbbd19b5de661e6e5f49e0475c5bc918d8e33803
Reviewed-on: https://go-review.googlesource.com/c/tools/+/441879
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-10-11 16:22:44 +00:00
..
analysis go/analysis: update tests for different go list error behavior 2022-10-11 16:22:44 +00:00
ast all: use constant to avoid repeated definitions 2022-09-19 15:32:23 +00:00
buildutil all: fix a few function names on comments 2022-10-10 13:22:38 +00:00
callgraph go/callgraph/vta: do not assume that recovers cannot be deferred 2022-08-03 21:02:27 +00:00
cfg all: gofmt 2022-04-12 17:53:17 +00:00
expect all: gofmt 2022-04-12 17:53:17 +00:00
gccgoexportdata all: gofmt 2022-04-12 17:53:17 +00:00
gcexportdata internal/gcimporter: add support for reading unified IR export data 2022-07-15 15:11:26 +00:00
internal go/internal/pkgbits: replace os.SEEK_CUR with io.SeekCurrent 2022-09-20 17:54:37 +00:00
loader all: gofmt 2022-04-12 17:53:17 +00:00
packages go/packages/packagestest: break dependency on gopls' span package 2022-10-07 14:18:09 +00:00
pointer go/ssa: tweak Function.Name() for generic instantiations 2022-05-18 21:36:11 +00:00
ssa all: fix a few function names on comments 2022-10-10 13:22:38 +00:00
types go/types/objectpath: implement fast path for concrete methods 2022-05-13 20:45:12 +00:00
vcs all: gofmt 2022-04-12 17:53:17 +00:00