From 8ba9a370eed74583cae5c33e386c53f4af039c90 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 16 Nov 2022 19:27:06 -0500 Subject: [PATCH] gopls/internal/lsp/mod: highlight when there is no fix for vuln Change-Id: If53455159b8578901ff728640e9c1ec671c61cdb Reviewed-on: https://go-review.googlesource.com/c/tools/+/451695 Reviewed-by: Suzy Mueller Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: Gopher Robot gopls-CI: kokoro --- gopls/internal/lsp/mod/hover.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gopls/internal/lsp/mod/hover.go b/gopls/internal/lsp/mod/hover.go index 547f25270b..520a029924 100644 --- a/gopls/internal/lsp/mod/hover.go +++ b/gopls/internal/lsp/mod/hover.go @@ -179,13 +179,13 @@ func formatVulnerabilities(modPath string, affecting, nonaffecting []*govulnchec } func fixedVersionInfo(v *govulncheck.Vuln, modPath string) string { - fix := "No fix is available." + fix := "\n**No fix is available.**" for _, m := range v.Modules { if m.Path != modPath { continue } if m.FixedVersion != "" { - fix = "Fixed in " + m.FixedVersion + "." + fix = "\nFixed in " + m.FixedVersion + "." } break }