diff --git a/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt b/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
index 3302dd3e982c4..53351541dee16 100644
--- a/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
+++ b/plugins/reporters/static-html/src/main/kotlin/StaticHtmlReporter.kt
@@ -479,7 +479,7 @@ class StaticHtmlReporter : Reporter {
if (row.scopes.isNotEmpty()) {
ul {
row.scopes.forEach { scope ->
- val excludedClass = if (scope.excludes.isNotEmpty()) "excluded" else ""
+ val excludedClass = "excluded".takeIf { scope.isExcluded() }.orEmpty()
li(excludedClass) {
+scope.name
if (scope.excludes.isNotEmpty()) {
diff --git a/plugins/reporters/static-html/src/main/kotlin/TablesReport.kt b/plugins/reporters/static-html/src/main/kotlin/TablesReport.kt
index f4afc268ff6cc..731aa6cfe1ba3 100644
--- a/plugins/reporters/static-html/src/main/kotlin/TablesReport.kt
+++ b/plugins/reporters/static-html/src/main/kotlin/TablesReport.kt
@@ -186,7 +186,7 @@ internal data class ProjectTable(
/**
* Return true if and only if this [Row] is excluded by any [ScopeExclude]s
*/
- fun isExcluded(): Boolean = scopes.isNotEmpty() && scopes.all { it.excludes.isNotEmpty() }
+ fun isExcluded(): Boolean = scopes.isNotEmpty() && scopes.all { it.isExcluded() }
}
data class Scope(
@@ -199,7 +199,12 @@ internal data class ProjectTable(
* The excludes matching this scope.
*/
val excludes: List
- )
+ ) {
+ /**
+ * Return true if an only if this scope is matched by any [ScopeExclude]'s.
+ */
+ fun isExcluded(): Boolean = excludes.isNotEmpty()
+ }
}
internal data class TablesReportIssue(