Skip to content

Commit

Permalink
refactor(evaluated-model): Inline actualScanResult
Browse files Browse the repository at this point in the history
Having to deal with `scanResult`, `evaluatedScanResult` and
`actualScanResult` is more complicated, than having only two of them.
So, inline the latter to simplify a bit.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed May 29, 2024
1 parent 1113161 commit f6fa2cb
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,21 +426,19 @@ internal class EvaluatedModelMapper(private val input: ReporterInput) {
calculatePackageVerificationCode(fileList.files.map { it.sha1 }.asSequence())
}.orEmpty(),
issues = issues
)

val actualScanResult = scanResults.addIfRequired(evaluatedScanResult)
).run { scanResults.addIfRequired(this) }

issues += addIssues(
result.summary.issues,
EvaluatedIssueType.SCANNER,
pkg,
actualScanResult,
evaluatedScanResult,
null
)

addLicensesAndCopyrights(pkg.id, result, actualScanResult, findings)
addLicensesAndCopyrights(pkg.id, result, evaluatedScanResult, findings)

return actualScanResult
return evaluatedScanResult
}

private fun addDependencyTree(project: Project, pkg: EvaluatedPackage, deduplicateDependencyTree: Boolean) {
Expand Down

0 comments on commit f6fa2cb

Please sign in to comment.