aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/plugability
diff options
context:
space:
mode:
authorAndrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com>2022-02-14 16:04:02 +0100
committerGitHub <noreply@github.com>2022-02-14 18:04:02 +0300
commit8ed821a024464a89069c30645005ca67728b7644 (patch)
tree98ba58ae3e86b092a7ffce16cbb3f88db74dddc3 /core/src/main/kotlin/plugability
parenta43e11e08d57bd898efc72d6db94ed3d4b01f74f (diff)
downloaddokka-8ed821a024464a89069c30645005ca67728b7644.tar.gz
dokka-8ed821a024464a89069c30645005ca67728b7644.tar.bz2
dokka-8ed821a024464a89069c30645005ca67728b7644.zip
Fix filtering suppresed extensions (#2348)
Diffstat (limited to 'core/src/main/kotlin/plugability')
-rw-r--r--core/src/main/kotlin/plugability/DokkaContext.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt
index 9c9e6978..f8aa5969 100644
--- a/core/src/main/kotlin/plugability/DokkaContext.kt
+++ b/core/src/main/kotlin/plugability/DokkaContext.kt
@@ -124,7 +124,11 @@ private class DokkaContextConfigurationImpl(
}
private fun findNotOverridden(bucket: Set<Extension<*, *, *>>): Extension<*, *, *> {
- val filtered = bucket.filter { it !in suppressedExtensions }
+ // Let's filter out all suppressedExtensions that are not only overrides.
+ // suppressedExtensions can be polluted by suppressions that completely disables the extension, and would break dokka behaviour
+ // if not filtered out
+ val suppressedExtensionsByOverrides = suppressedExtensions.filterNot { it.value.any { it !is Suppression.ByExtension } }
+ val filtered = bucket.filterNot { it in suppressedExtensionsByOverrides }
return filtered.singleOrNull()
?: throw IllegalStateException("Conflicting overrides: $filtered")
}