diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/links/DRI.kt | 1 | ||||
-rw-r--r-- | core/src/main/kotlin/plugability/DokkaContext.kt | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt index a69fa4e3..25b9546f 100644 --- a/core/src/main/kotlin/links/DRI.kt +++ b/core/src/main/kotlin/links/DRI.kt @@ -19,6 +19,7 @@ data class DRI( companion object { val topLevel = DRI() + } } diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt index ee3215cc..9c9e6978 100644 --- a/core/src/main/kotlin/plugability/DokkaContext.kt +++ b/core/src/main/kotlin/plugability/DokkaContext.kt @@ -1,6 +1,5 @@ package org.jetbrains.dokka.plugability -import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.utilities.DokkaLogger import java.io.File @@ -9,7 +8,6 @@ import java.util.* import kotlin.reflect.KClass import kotlin.reflect.full.createInstance - interface DokkaContext { fun <T : DokkaPlugin> plugin(kclass: KClass<T>): T? @@ -22,7 +20,6 @@ interface DokkaContext { val configuration: DokkaConfiguration val unusedPoints: Collection<ExtensionPoint<*>> - companion object { fun create( configuration: DokkaConfiguration, @@ -192,6 +189,9 @@ private class DokkaContextConfigurationImpl( } if (extension.override is OverrideKind.Present) { + fun root(ext: Extension<*, *, *>): List<Extension<*, *, *>> = if (ext.override is OverrideKind.Present) ext.override.overriden.flatMap(::root) else listOf(ext) + if (extension.override.overriden.size > 1 && root(extension).distinct().size > 1) + throw IllegalStateException("Extension $extension overrides extensions without common root") extension.override.overriden.forEach { overriden -> suppressedExtensions.listFor(overriden) += Suppression.ByExtension(extension) } |