1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:04:43 -07:00
go/internal/lsp/cache
Peter Weinbergr 39188db588 internal/lsp: add support for RelatedInformation in diagnostics
The type checker sometimes emits secondary diagnostics. For instance,
if a function is defined twice, then when it sees the second definition
it emits a diagnostic at the second definition and a secondary diagnostic
pointing to the first diagnostic. Presently gopls treats these as two
separate diagnostics. The changed code still produces two diagnostics,
but now the secondary diagnostic is also converted into a
RelatedInformation so the user sees a xpointer to the earlier definition.

Updates https://github.com/golang/go/issues/39062.

Change-Id: Ic421ec91d2b46c28681ab3ec010d5b02c0442e68
Reviewed-on: https://go-review.googlesource.com/c/tools/+/251617
Run-TryBot: Peter Weinberger <pjw@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-09-04 18:57:47 +00:00
..
analysis.go internal/memoize: switch from GC-driven to explicit deletion 2020-08-10 19:02:17 +00:00
cache.go internal/memoize: switch from GC-driven to explicit deletion 2020-08-10 19:02:17 +00:00
check.go internal/lsp: add support for RelatedInformation in diagnostics 2020-09-04 18:57:47 +00:00
error_test.go internal/lsp: refactor error handling code in type-checking 2019-10-21 18:57:46 +00:00
errors.go internal/lsp: add support for RelatedInformation in diagnostics 2020-09-04 18:57:47 +00:00
keys.go internal/lsp: decouple client and server debug 2020-06-11 13:49:48 +00:00
load.go internal/lsp, go/packages: work-around invalid files in GOPATH mode 2020-08-27 16:29:21 +00:00
mod_tidy.go internal/lsp: fix bad go mod tidy quick fix title 2020-08-12 18:39:12 +00:00
mod.go internal/lsp/cache: use the right snapshot in ModUpgrade 2020-09-02 17:11:20 +00:00
os_darwin.go internal/lsp: add a mutex around the view's options 2020-04-02 16:41:49 +00:00
os_windows.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
parse_test.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
parse.go internal/lsp/cache: trim ellipsis array literals 2020-08-12 23:16:40 +00:00
pkg.go internal/lsp: fix a few staticcheck suggestions, some cleanup 2020-07-29 17:11:59 +00:00
session.go internal/lsp: improve handling of non-Go folders 2020-08-17 19:03:02 +00:00
snapshot.go internal/lsp/cache: don't invalidate metadata for new invalid imports 2020-08-28 16:18:49 +00:00
view_test.go internal/lsp/cache: validate workspace path case 2020-03-27 19:55:53 +00:00
view.go internal/lsp: fix builds and tests for go1.12+ 2020-08-27 14:30:46 +00:00