Skip to content

Commit

Permalink
revert: --list-all-pkgs
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed May 28, 2024
1 parent 8e1c970 commit 5ff1a3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pkg/flag/report_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ type ReportOptions struct {
ReportFormat string
Template string
DependencyTree bool
ListAllPkgs bool
IgnoreFile string
ExitCode int
ExitOnEOL int
Expand All @@ -141,8 +142,6 @@ type ReportOptions struct {
Severities []dbTypes.Severity
Compliance spec.ComplianceSpec
ShowSuppressed bool

listAllPkgs bool
}

func NewReportFlagGroup() *ReportFlagGroup {
Expand Down Expand Up @@ -243,7 +242,7 @@ func (f *ReportFlagGroup) ToOptions() (ReportOptions, error) {
ReportFormat: f.ReportFormat.Value(),
Template: template,
DependencyTree: dependencyTree,
listAllPkgs: listAllPkgs,
ListAllPkgs: listAllPkgs,
IgnoreFile: f.IgnoreFile.Value(),
ExitCode: f.ExitCode.Value(),
ExitOnEOL: f.ExitOnEOL.Value(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/report/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func Write(ctx context.Context, report types.Report, option flag.Options) (err e
case types.FormatJSON:
writer = &JSONWriter{
Output: output,
ListAllPkgs: option.Scanners.Enabled(types.SBOMScanner),
ListAllPkgs: option.ListAllPkgs,
}
case types.FormatGitHub:
writer = &github.Writer{
Expand Down

0 comments on commit 5ff1a3d

Please sign in to comment.