internal/lsp: run analyses despite some errors

Updates golang/go#32247

Change-Id: Id474e62ea70676c782eb49dddebd64d7f274d2cf
Reviewed-on: https://go-review.googlesource.com/c/tools/+/179218
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
Rebecca Stambler 2019-05-28 15:17:07 -04:00
parent 09281b52a1
commit 08bd53a4b4
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ func (act *Action) execOnce(ctx context.Context, fset *token.FileSet) error {
} }
act.pass = pass act.pass = pass
if len(act.Pkg.GetErrors()) > 0 && !pass.Analyzer.RunDespiteErrors { if act.Pkg.IsIllTyped() && !pass.Analyzer.RunDespiteErrors {
act.err = fmt.Errorf("analysis skipped due to errors in package: %v", act.Pkg.GetErrors()) act.err = fmt.Errorf("analysis skipped due to errors in package: %v", act.Pkg.GetErrors())
} else { } else {
act.result, act.err = pass.Analyzer.Run(pass) act.result, act.err = pass.Analyzer.Run(pass)