From 8ed821a024464a89069c30645005ca67728b7644 Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak <32793002+BarkingBad@users.noreply.github.com> Date: Mon, 14 Feb 2022 16:04:02 +0100 Subject: Fix filtering suppresed extensions (#2348) --- core/src/main/kotlin/plugability/DokkaContext.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/src/main/kotlin/plugability') 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<*, *, *> { - 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") } -- cgit