diff --git a/reporter/src/funTest/assets/static-html-reporter-test-expected-output.html b/reporter/src/funTest/assets/static-html-reporter-test-expected-output.html index 0105a655ab0a9..8a627dc7e962f 100644 --- a/reporter/src/funTest/assets/static-html-reporter-test-expected-output.html +++ b/reporter/src/funTest/assets/static-html-reporter-test-expected-output.html @@ -265,10 +265,10 @@

Index

-

Rule Violation Summary (1 errors, 1 warnings, 1 hints)

+

Rule Violation Summary (1 errors, 1 warnings, 1 hints to resolve)

@@ -305,7 +305,7 @@

Rule Violation Summary (1 errors, 1 warnings, 1

-

Issue Summary (1 errors, 0 warnings, 0 hints)

+

Issue Summary (1 errors, 0 warnings, 0 hints to resolve)

Issues from excluded components are not shown in this summary.

Packages

diff --git a/reporter/src/main/kotlin/reporters/ReportTableModel.kt b/reporter/src/main/kotlin/reporters/ReportTableModel.kt index cab71c8def4cf..4eb900ecc377d 100644 --- a/reporter/src/main/kotlin/reporters/ReportTableModel.kt +++ b/reporter/src/main/kotlin/reporters/ReportTableModel.kt @@ -191,13 +191,13 @@ data class ReportTableModel( data class IssueTable( val rows: List ) { - val allIssues = rows.flatMap { + val unresolvedIssues = rows.flatMap { it.analyzerIssues.flatMap { (_, issues) -> issues } + it.scanIssues.flatMap { (_, issues) -> issues } - }.groupBy { it.severity } + }.filterNot { it.isResolved }.groupBy { it.severity } - val errorCount = allIssues[Severity.ERROR].orEmpty().count() - val warningCount = allIssues[Severity.WARNING].orEmpty().count() - val hintCount = allIssues[Severity.HINT].orEmpty().count() + val errorCount = unresolvedIssues[Severity.ERROR].orEmpty().count() + val warningCount = unresolvedIssues[Severity.WARNING].orEmpty().count() + val hintCount = unresolvedIssues[Severity.HINT].orEmpty().count() } data class IssueRow( diff --git a/reporter/src/main/kotlin/reporters/StaticHtmlReporter.kt b/reporter/src/main/kotlin/reporters/StaticHtmlReporter.kt index 9ad97e95b69dd..0dca327dc9a48 100644 --- a/reporter/src/main/kotlin/reporters/StaticHtmlReporter.kt +++ b/reporter/src/main/kotlin/reporters/StaticHtmlReporter.kt @@ -380,23 +380,24 @@ class StaticHtmlReporter : Reporter() { ul { reportTableModel.evaluatorIssues?.let { ruleViolations -> - val issues = ruleViolations.groupBy { it.severity } + val issues = ruleViolations.filterNot { it.isResolved }.groupBy { it.severity } val errorCount = issues[Severity.ERROR].orEmpty().count() val warningCount = issues[Severity.WARNING].orEmpty().count() val hintCount = issues[Severity.HINT].orEmpty().count() li { a("#rule-violation-summary") { - +"Rule Violation Summary ($errorCount errors, $warningCount warnings, $hintCount hints)" + +("Rule Violation Summary ($errorCount errors, $warningCount warnings, $hintCount hints to " + + "resolve)") } } } - if (reportTableModel.issueSummary.allIssues.isNotEmpty()) { + if (reportTableModel.issueSummary.rows.isNotEmpty()) { li { a("#issue-summary") { with(reportTableModel.issueSummary) { - +"Issue Summary ($errorCount errors, $warningCount warnings, $hintCount hints)" + +"Issue Summary ($errorCount errors, $warningCount warnings, $hintCount hints to resolve)" } } } @@ -418,14 +419,14 @@ class StaticHtmlReporter : Reporter() { } private fun DIV.evaluatorTable(ruleViolations: List) { - val issues = ruleViolations.groupBy { it.severity } + val issues = ruleViolations.filterNot { it.isResolved }.groupBy { it.severity } val errorCount = issues[Severity.ERROR].orEmpty().count() val warningCount = issues[Severity.WARNING].orEmpty().count() val hintCount = issues[Severity.HINT].orEmpty().count() h2 { id = "rule-violation-summary" - +"Rule Violation Summary ($errorCount errors, $warningCount warnings, $hintCount hints)" + +"Rule Violation Summary ($errorCount errors, $warningCount warnings, $hintCount hints to resolve)" } if (ruleViolations.isEmpty()) { @@ -482,7 +483,7 @@ class StaticHtmlReporter : Reporter() { h2 { id = "issue-summary" with(issueSummary) { - +"Issue Summary ($errorCount errors, $warningCount warnings, $hintCount hints)" + +"Issue Summary ($errorCount errors, $warningCount warnings, $hintCount hints to resolve)" } }