Skip to content

Commit b7b6f9c

Browse files
committed
remove redundant defensive check
1 parent cb3d3c3 commit b7b6f9c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

scanpullrequest/scanpullrequest.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,6 @@ func auditPullRequestSourceCode(repoConfig *utils.Repository, scanDetails *utils
170170
}
171171
// Set JAS output flags based on the scan results
172172
repoConfig.OutputWriter.SetJasOutputFlags(scanResults.EntitledForJas, scanResults.HasJasScansResults(jasutils.Applicability))
173-
174-
if targetBranchWd == "" || scanDetails.ResultsToCompare == nil {
175-
// Since we only perform a Diff scan in this flow - if target wd or target results are missing it means something went wrong with the target scan
176-
issuesCollection = &issues.ScansIssuesCollection{ScanStatus: getResultScanStatues(scanResults)}
177-
err = errors.New("targetBranchWd or target branch scans results are empty")
178-
return
179-
}
180173
filterFailedResultsIfScannersFailuresAreAllowed(scanDetails.ResultsToCompare, scanResults, repoConfig.Params.ConfigProfile.GeneralConfig.FailUponAnyScannerError, sourceBranchWd, targetBranchWd)
181174

182175
log.Debug("Diff scan - converting to new issues...")

0 commit comments

Comments
 (0)