go/gopls/internal
Hana (Hyang-Ah) Kim fc039936a9 internal/lsp/mod: adjust vulncheck diagnostics suppression logic
Vulnerabilities associated with a module should be suppressed
after the module is updated. Previously, we checked whether the
module version in go.mod 'require' matches the FoundVersion reported
by the vulncheck. However, we realized that we cannot always assume
the module version in require is the actually used module version
(due to how minimal version selection works, and how exclude/replace
affects). Instead check whether the module version is newer or equals
to the suggested fixed version and if this go.mod require is newer,
assume that the user updated the module already and suppress diagnostics
about the module. This is not perfect but a heuristic to reduce
confusion from the stale vulncheck report right after applying the
quick fixes and upgrading modules.

Change-Id: I40f4c3e70b19af3f6edd98f30de3ccb7a6bd7498
Reviewed-on: https://go-review.googlesource.com/c/tools/+/450277
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>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-11-18 21:37:48 +00:00
..
coverage gopls/coverage: repair coverage.go 2022-11-07 18:26:12 +00:00
govulncheck gopls: sync golang.org/x/vuln@3af8368ee4fe 2022-11-10 23:14:17 +00:00
hooks gopls: update dependencies following the v0.10.0 release 2022-11-04 16:52:27 +00:00
lsp internal/lsp/mod: adjust vulncheck diagnostics suppression logic 2022-11-18 21:37:48 +00:00
regtest internal/lsp/cache: remove support for invalid metadata 2022-11-18 17:16:01 +00:00
robustio internal/robustio: fix log.Fatal calls that should be log.Fatalf 2022-10-10 21:31:25 +00:00
span gopls/internal/lsp: tolerate missing end position in RelatedInformation 2022-10-19 18:04:39 +00:00
vulncheck gopls/internal/vulncheck: log progress 2022-11-18 20:21:45 +00:00
migrate.sh gopls/internal/migrate.sh: a script to migrate internal/lsp to gopls/ 2022-09-07 14:10:36 +00:00