1
0
mirror of https://github.com/golang/go synced 2024-09-30 14:18:32 -06:00
go/gopls/internal
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
..
hooks gopls, internal/lsp: support an extra formatting hook for gofumpt 2020-07-13 21:42:47 +00:00
regtest internal/lsp: add support for RelatedInformation in diagnostics 2020-09-04 18:57:47 +00:00