go/gopls/internal/lsp/mod
Hana (Hyang-Ah) Kim 32a17c01dd gopls/internal/lsp/mod: fix unaffecting vuln diagnostics msgs
When there is no affecting vulns, we should not add the
warning-level message. This bug made informational diagnostic
messages look like

  "example.com/mod has vulnerabilities used in the code: .
example.com/mod has a vulnerability GO-2022-0493 that is not used
in the code."

Also, add a test case that checks the code with only non-affecting
vulnerability.

Change-Id: I88700a538495bc5c1c1a515bd1f119b2705964a3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/450276
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-11-18 15:58:55 +00:00
..
testdata/unchanged gopls: migrate internal/lsp to gopls/internal/lsp 2022-09-07 16:44:44 +00:00
code_lens.go gopls/internal/span: some cleanups 2022-10-13 13:15:27 +00:00
diagnostics.go gopls/internal/lsp/mod: fix unaffecting vuln diagnostics msgs 2022-11-18 15:58:55 +00:00
format.go internal/diff: simplify API, break span dependency 2022-10-05 20:32:15 +00:00
hover.go gopls: sync golang.org/x/vuln@3af8368ee4fe 2022-11-10 23:14:17 +00:00
mod_test.go gopls/internal/span: move internal/span into gopls 2022-10-07 14:50:44 +00:00