go/gopls/internal/regtest/misc
Hana (Hyang-Ah) Kim 121f889bbc gopls/internal/lsp/mod: merge vuln diagnostics to one, and add a hover
When a module contains multiple vulnerabilities, previously gopls published
one diagnostic message for each vulnerability. This change modifies this
behavior to publish only one vuln diagnostic for each module. This will
make the PROBLEMS panel more concise and readable. However, the information
about each vulnerability finding is useful, so we supplement this diagnostics
by sending a hover message in the module require line. An added benefit
of this approach is that, unlike the Diagnostics, VS Code supports rich
text rendering for Hover messages. So we can use markdown to add links and
necessary highlighting.

Before this change, go.mod require hover messages (e.g. go mod why result)
were associated only with the module path part, excluding the version string
part. But for vulnerability information hover message, I think it is better
to be applied to the entire module require line (both module path & version)
because they are information about the specific module/version. Currently
LSP hover returns only one hover, so we cannot use this different range only
to the vulnerability information hover. Thus, one side effect of this change
is that the module info hover message will be also shown to the version
part of each require statement.

Change-Id: Iccacd19fdebadc4768abcad8a218bbae14f9d7e2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/444798
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-10-25 17:27:10 +00:00
..
call_hierarchy_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
configuration_test.go gopls: deprecate three experimental features 2022-09-28 16:54:30 +00:00
debugserver_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
definition_test.go gopls/internal: support renaming packages with int. test variants 2022-10-20 17:36:38 +00:00
embed_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
extract_test.go gopls: fix out of bounds bug in extract 2022-09-21 16:48:39 +00:00
failures_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
fix_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
formatting_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
generate_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
highlight_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
hover_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
import_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
imports_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
link_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
misc_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
multiple_adhoc_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
references_test.go gopls/internal/lsp/source: find references in test packages 2022-10-11 14:54:39 +00:00
rename_test.go gopls/internal: support renaming packages with int. test variants 2022-10-20 17:36:38 +00:00
semantictokens_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
settings_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
shared_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
staticcheck_test.go gopls/internal/lsp: tolerate missing end position in RelatedInformation 2022-10-19 18:04:39 +00:00
vendor_test.go gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
vuln_test.go gopls/internal/lsp/mod: merge vuln diagnostics to one, and add a hover 2022-10-25 17:27:10 +00:00
workspace_symbol_test.go gopls/internal/lsp/cache: add support for loading standalone main files 2022-10-13 15:07:40 +00:00