internal/lsp: polish vulncheck progress messages

gopls.run_vulncheck_exp runs `gopls vulncheck`
(fork of govulncheck) and pipes its stderr (logs)
as progress messages. The default log format
includes timestamp and that is too long for progress
message. Tell gopls vulncheck to omit timestamp
in the log message.

Use "govulncheck" as the progress message prefix,
instead of the long "Checking vulnerabilities".

Change-Id: I92fe9958b20d0260711a42af9b5f9f399e267587
Reviewed-on: https://go-review.googlesource.com/c/tools/+/420998
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/gopls/internal/regtest/misc/vuln_test.go b/gopls/internal/regtest/misc/vuln_test.go
index 78c193e..91fef3f 100644
--- a/gopls/internal/regtest/misc/vuln_test.go
+++ b/gopls/internal/regtest/misc/vuln_test.go
@@ -109,7 +109,7 @@
 			Arguments: lens.Command.Arguments,
 		}, nil)
 		env.Await(
-			CompletedWork("Checking vulnerability", 1, true),
+			CompletedWork("govulncheck", 1, true),
 			// TODO(hyangah): once the diagnostics are published, wait for diagnostics.
 			ShownMessage("Found GO-0000-001"),
 		)
diff --git a/gopls/internal/vulncheck/command.go b/gopls/internal/vulncheck/command.go
index b84daa5..60d582c 100644
--- a/gopls/internal/vulncheck/command.go
+++ b/gopls/internal/vulncheck/command.go
@@ -70,29 +70,30 @@
 
 // Run runs the govulncheck after loading packages using the provided packages.Config.
 func (c *cmd) Run(ctx context.Context, cfg *packages.Config, patterns ...string) (_ []Vuln, err error) {
+	logger := log.New(log.Default().Writer(), "", 0)
 	cfg.Mode |= packages.NeedModule | packages.NeedName | packages.NeedFiles |
 		packages.NeedCompiledGoFiles | packages.NeedImports | packages.NeedTypes |
 		packages.NeedTypesSizes | packages.NeedSyntax | packages.NeedTypesInfo | packages.NeedDeps
 
-	log.Println("loading packages...")
+	logger.Println("loading packages...")
 	loadedPkgs, err := gvc.LoadPackages(cfg, patterns...)
 	if err != nil {
-		log.Printf("package load failed: %v", err)
+		logger.Printf("package load failed: %v", err)
 		return nil, err
 	}
 
-	log.Printf("analyzing %d packages...\n", len(loadedPkgs))
+	logger.Printf("analyzing %d packages...\n", len(loadedPkgs))
 
 	r, err := vulncheck.Source(ctx, loadedPkgs, &vulncheck.Config{Client: c.Client, SourceGoVersion: goVersion()})
 	if err != nil {
 		return nil, err
 	}
 
-	log.Printf("selecting affecting vulnerabilities from %d findings...\n", len(r.Vulns))
+	logger.Printf("selecting affecting vulnerabilities from %d findings...\n", len(r.Vulns))
 	unaffectedMods := filterUnaffected(r.Vulns)
 	r.Vulns = filterCalled(r)
 
-	log.Printf("found %d vulnerabilities.\n", len(r.Vulns))
+	logger.Printf("found %d vulnerabilities.\n", len(r.Vulns))
 	callInfo := gvc.GetCallInfo(r, loadedPkgs)
 	return toVulns(callInfo, unaffectedMods)
 	// TODO: add import graphs.
diff --git a/internal/lsp/command.go b/internal/lsp/command.go
index 1d6c973..35bc0e43 100644
--- a/internal/lsp/command.go
+++ b/internal/lsp/command.go
@@ -807,7 +807,7 @@
 	}
 	err := c.run(ctx, commandConfig{
 		async:       true, // need to be async to be cancellable
-		progress:    "Checking vulnerability",
+		progress:    "govulncheck",
 		requireSave: true,
 		forURI:      args.URI,
 	}, func(ctx context.Context, deps commandDeps) error {