mirror of https://github.com/golang/go.git
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> |
||
|---|---|---|
| .. | ||
| call_hierarchy_test.go | ||
| configuration_test.go | ||
| debugserver_test.go | ||
| definition_test.go | ||
| embed_test.go | ||
| extract_test.go | ||
| failures_test.go | ||
| fix_test.go | ||
| formatting_test.go | ||
| generate_test.go | ||
| highlight_test.go | ||
| hover_test.go | ||
| import_test.go | ||
| imports_test.go | ||
| link_test.go | ||
| misc_test.go | ||
| multiple_adhoc_test.go | ||
| references_test.go | ||
| rename_test.go | ||
| semantictokens_test.go | ||
| settings_test.go | ||
| shared_test.go | ||
| staticcheck_test.go | ||
| vendor_test.go | ||
| vuln_test.go | ||
| workspace_symbol_test.go | ||