From 456167b207884e9b202fd27ae835f3e9bfae686c Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Fri, 26 Apr 2024 09:32:56 +0200 Subject: [PATCH] fix(reporter): Fix-up determining the worst severity This is a fix-up for [1]. [1]: https://github.com/oss-review-toolkit/ort/commit/405fd4351838d98cd82bfb74cebc0505d1bfa0d5 Signed-off-by: Frank Viernau --- .../reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt b/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt index 4eb816b7bf127..983e8c175b95d 100644 --- a/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt +++ b/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt @@ -367,7 +367,7 @@ class StaticHtmlReporter : Reporter { val issues = (row.analyzerIssues + row.scanIssues).flatMap { it.value } - val worstSeverity = issues.filterNot { it.isResolved }.minOfOrNull { it.severity } ?: Severity.ERROR + val worstSeverity = issues.filterNot { it.isResolved }.maxOfOrNull { it.severity } ?: Severity.ERROR val areAllResolved = issues.isNotEmpty() && issues.all { it.isResolved }