go/go/expect
Rob Findley a43f69b1f5 go/expect: use parser.AllErrors when extracting Notes
Without this parser mode, go/parser will bail out and return no comments
from a parsed file if there are more than 10 errors. This can lead to
tests silently not running, as noted in the TODO right above the parse.

This can still happen: poor parser recovery could result in comments not
being parsed. However, the parser is generally pretty good about
preserving comments, and anyway passing parser.AllErrors means that
adding a single new error to a testdata file will not suddenly cause all
errors in that file to be ignored.

Change-Id: Ib3c22944999651018d38fa6ce5c5a11ac6853aa0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/293932
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-02-23 18:29:07 +00:00
..
testdata all: update dependencies in go.mod file 2020-07-06 23:19:48 +00:00
expect.go all: update dependencies in go.mod file 2020-07-06 23:19:48 +00:00
expect_test.go all: update dependencies in go.mod file 2020-07-06 23:19:48 +00:00
extract.go go/expect: use parser.AllErrors when extracting Notes 2021-02-23 18:29:07 +00:00