Skip to content

Commit

Permalink
chore(evaluator): Remove a few named lambda variables to simplify code
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Sep 18, 2024
1 parent 95cba40 commit 61eb5c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions evaluator/src/main/kotlin/PackageRule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ open class PackageRule(
override fun matches(): Boolean {
val run = ruleSet.ortResult.advisor ?: return false
return run.getVulnerabilities(pkg.metadata.id).asSequence()
.filter { vulnerability -> !ruleSet.resolutionProvider.isResolved(vulnerability) }
.filter { !ruleSet.resolutionProvider.isResolved(it) }
.flatMap { it.references }
.filter { reference -> reference.scoringSystem == scoringSystem }
.mapNotNull { reference -> reference.severity }
.filter { it.scoringSystem == scoringSystem }
.mapNotNull { it.severity }
.any { severityComparator(it, threshold) }
}
}
Expand Down

0 comments on commit 61eb5c1

Please sign in to comment.