1
0
mirror of https://github.com/golang/go synced 2024-11-05 14:56:10 -07:00
go/internal/lsp/mod
Rebecca Stambler 58eba7e750 internal/lsp: refactor go.mod diagnostics to simplify the API
Currently, diagnostics for modules that are missing from the go.mod
appear in the Go files in which those modules are imported. As a result,
the diagnostics were previously calculated as part of the Go file
diagnostic calculations. This is convoluted and required passing around
an extra map.

This CL puts that logic in the ModTidyHandle where it belongs.
The diagnostics for the Go files are combined from the multiple sources.

Also, added a skipped test for golang/go#39784, since this CL was
originally intended to be a fix for that issue...

Change-Id: Ic0f9aa235dcd56ea131a2339de9801346f715415
Reviewed-on: https://go-review.googlesource.com/c/tools/+/242579
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2020-07-16 22:50:03 +00:00
..
testdata/unchanged internal/lsp/tests: fix reset of golden files 2020-02-19 14:42:13 +00:00
code_lens.go internal/lsp: refactor various module-specific handles in cache 2020-06-23 18:31:46 +00:00
diagnostics.go internal/lsp: refactor go.mod diagnostics to simplify the API 2020-07-16 22:50:03 +00:00
format.go internal/lsp: refactor various module-specific handles in cache 2020-06-23 18:31:46 +00:00
hover.go internal/lsp: refactor various module-specific handles in cache 2020-06-23 18:31:46 +00:00
mod_test.go internal/lsp: use a new temporary go.mod for every go list call 2020-06-18 02:37:23 +00:00