diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-07-01 19:35:29 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-07 10:07:21 +0200 |
commit | 0a73ca69049163d59185223f518a9fc22afccaab (patch) | |
tree | a12b8da0ccebd7241a55716baac5a17a7101abd2 /core | |
parent | 1f73de1df8cce09ac4e760db34759ca70ee12b6d (diff) | |
download | dokka-0a73ca69049163d59185223f518a9fc22afccaab.tar.gz dokka-0a73ca69049163d59185223f518a9fc22afccaab.tar.bz2 dokka-0a73ca69049163d59185223f518a9fc22afccaab.zip |
Add suppression reporting to log
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/plugability/DokkaContext.kt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt index e7028ccf..59090522 100644 --- a/core/src/main/kotlin/plugability/DokkaContext.kt +++ b/core/src/main/kotlin/plugability/DokkaContext.kt @@ -68,10 +68,13 @@ private class DokkaContextConfigurationImpl( } private sealed class Suppression { - data class ByExtension(val extension: Extension<*, *, *>) : Suppression() - + data class ByExtension(val extension: Extension<*, *, *>) : Suppression() { + override fun toString() = extension.toString() + } - data class ByPlugin(val plugin: DokkaPlugin) : Suppression() + data class ByPlugin(val plugin: DokkaPlugin) : Suppression() { + override fun toString() = "Plugin ${plugin::class.qualifiedName}" + } } private val rawExtensions = mutableListOf<Extension<*, *, *>>() @@ -197,9 +200,14 @@ private class DokkaContextConfigurationImpl( val loadedListForDebug = extensions.run { keys + values.flatten() }.toList() .joinToString(prefix = "[\n", separator = ",\n", postfix = "\n]") { "\t$it" } + val suppressedList = suppressedExtensions.asSequence() + .joinToString(prefix = "[\n", separator = ",\n", postfix = "\n]") { + "\t${it.key} by " + (it.value.singleOrNull() ?: it.value) + } + logger.progress("Loaded plugins: $pluginNames") logger.progress("Loaded: $loadedListForDebug") - + logger.progress("Suppressed: $suppressedList") } } |