Skip to content

Commit

Permalink
Add a parameter to disable the summary display (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
sailro authored Nov 29, 2023
1 parent 2bd065b commit 2b8468b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public class ScanSettings : BaseSettings
[TypeConverter(typeof(CommaDelimitedConverter))]
public IEnumerable<string> DockerImagesToScan { get; set; }

[CommandOption("--NoSummary")]
[Description("Do not display the detection summary on the standard output nor in the logs.")]
public bool NoSummary { get; set; }

/// <inheritdoc />
public override ValidationResult Validate()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ public async Task<DetectorProcessingResult> ProcessDetectorsAsync(
var detectorProcessingResult = this.ConvertDetectorResultsIntoResult(results, exitCode);

var totalElapsedTime = stopwatch.Elapsed.TotalSeconds;
this.LogTabularOutput(providerElapsedTime, totalElapsedTime);

if (!settings.NoSummary)
{
this.LogTabularOutput(providerElapsedTime, totalElapsedTime);
}

// If there are components which are skipped due to connection or parsing
// errors, log them by detector.
Expand Down

0 comments on commit 2b8468b

Please sign in to comment.