Skip to content

Commit

Permalink
revert 'not showing errors from SCA for threshold' (AST-43867) (#796)
Browse files Browse the repository at this point in the history
* revert  "not showing errors from SCA for threshold"

* fix lint
  • Loading branch information
elchananarb authored Jul 16, 2024
1 parent 71e3ec4 commit df80496
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions internal/commands/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ func CreateScanReport(
return err
}
if !scanPending {
results, err = ReadResults(resultsWrapper, scan, params, false)
results, err = ReadResults(resultsWrapper, scan, params)
if err != nil {
return err
}
Expand Down Expand Up @@ -1252,7 +1252,6 @@ func ReadResults(
resultsWrapper wrappers.ResultsWrapper,
scan *wrappers.ScanResponseModel,
params map[string]string,
isThresholdCheck bool,
) (results *wrappers.ScanResultsCollection, err error) {
var resultsModel *wrappers.ScanResultsCollection
var errorModel *wrappers.WebError
Expand All @@ -1275,7 +1274,7 @@ func ReadResults(
resultsModel = ComputeRedundantSastResults(resultsModel)
}
resultsModel, err = enrichScaResults(resultsWrapper, scan, params, resultsModel)
if err != nil && !isThresholdCheck {
if err != nil {
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion internal/commands/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,7 @@ func getSummaryThresholdMap(resultsWrapper wrappers.ResultsWrapper, scan *wrappe
map[string]int,
error,
) {
results, err := ReadResults(resultsWrapper, scan, params, true)
results, err := ReadResults(resultsWrapper, scan, params)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit df80496

Please sign in to comment.