aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-07-01 19:35:29 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-07 10:07:21 +0200
commit0a73ca69049163d59185223f518a9fc22afccaab (patch)
treea12b8da0ccebd7241a55716baac5a17a7101abd2 /core/src
parent1f73de1df8cce09ac4e760db34759ca70ee12b6d (diff)
downloaddokka-0a73ca69049163d59185223f518a9fc22afccaab.tar.gz
dokka-0a73ca69049163d59185223f518a9fc22afccaab.tar.bz2
dokka-0a73ca69049163d59185223f518a9fc22afccaab.zip
Add suppression reporting to log
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/plugability/DokkaContext.kt16
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")
}
}