Skip to content

Commit

Permalink
internal/govulncheck: add WantPackages scan level
Browse files Browse the repository at this point in the history
Adds a check for if govulncheck is at a scan level more precise than
module level scanning (can also be used to check if the scan is at a
module level).

Change-Id: I5231e6a88c865a978a3f570d558705754e60501a
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/522737
Run-TryBot: Maceo Thompson <maceothompson@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
Maceo Thompson committed Aug 25, 2023
1 parent da4b74a commit f9a767c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/govulncheck/govulncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,7 @@ const (
// WantSymbols can be used to check whether the scan level is one that is able
// to generate symbols called findings.
func (l ScanLevel) WantSymbols() bool { return l == scanLevelSymbol }

// WantPackages can be used to check whether the scan level is one that is able
// to generate package
func (l ScanLevel) WantPackages() bool { return l == scanLevelPackage || l == scanLevelSymbol }

0 comments on commit f9a767c

Please sign in to comment.