mirror of https://github.com/golang/go.git
gopls/internal/vulncheck: adjust logging
Report # of findings Change-Id: Ib10d18a23280a8644b9c08a8d51d6e288ae761db Reviewed-on: https://go-review.googlesource.com/c/tools/+/415496 Reviewed-by: Suzy Mueller <suzmue@golang.org>
This commit is contained in:
parent
04bd087817
commit
005c07ac5a
|
|
@ -80,7 +80,6 @@ func (c *cmd) Run(ctx context.Context, cfg *packages.Config, patterns ...string)
|
|||
log.Printf("package load failed: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
log.Printf("loaded %d packages\n", len(loadedPkgs))
|
||||
|
||||
log.Printf("analyzing %d packages...\n", len(loadedPkgs))
|
||||
|
||||
|
|
@ -88,9 +87,12 @@ func (c *cmd) Run(ctx context.Context, cfg *packages.Config, patterns ...string)
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
log.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))
|
||||
callInfo := gvc.GetCallInfo(r, loadedPkgs)
|
||||
return toVulns(callInfo, unaffectedMods)
|
||||
// TODO: add import graphs.
|
||||
|
|
|
|||
Loading…
Reference in New Issue