aboutsummaryrefslogtreecommitdiff
path: root/testApi/src
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-09 13:40:03 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-06-15 19:17:11 +0200
commitee425e0b1e39245f5e1106bbb0888e557e6fbfcd (patch)
tree4348359dc6c95129d33d2468ec3be86e4a95491e /testApi/src
parentbae2c8de63baf0c0b627a17ae179400fbc3c5be9 (diff)
downloaddokka-ee425e0b1e39245f5e1106bbb0888e557e6fbfcd.tar.gz
dokka-ee425e0b1e39245f5e1106bbb0888e557e6fbfcd.tar.bz2
dokka-ee425e0b1e39245f5e1106bbb0888e557e6fbfcd.zip
Implement "failOnWarning" option
Diffstat (limited to 'testApi/src')
-rw-r--r--testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt5
-rw-r--r--testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt7
2 files changed, 9 insertions, 3 deletions
diff --git a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt b/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt
index 802bfd93..2ca8523b 100644
--- a/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt
+++ b/testApi/src/main/kotlin/testApi/testRunner/DokkaTestGenerator.kt
@@ -25,7 +25,8 @@ internal class DokkaTestGenerator(
)
analysisSetupStage(platforms)
- val context = dokkaGenerator.initializePlugins(configuration, logger, platforms, sourceSetsCache, pluginOverrides)
+ val context =
+ dokkaGenerator.initializePlugins(configuration, logger, platforms, sourceSetsCache, pluginOverrides)
pluginsSetupStage(context)
val modulesFromPlatforms = dokkaGenerator.createDocumentationModels(platforms, context)
@@ -48,5 +49,7 @@ internal class DokkaTestGenerator(
dokkaGenerator.render(transformedPages, context)
renderingStage(transformedPages, context)
+
+ dokkaGenerator.reportAfterRendering(context)
}
} \ No newline at end of file
diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
index edfc9049..3fde41a0 100644
--- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
+++ b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
@@ -9,6 +9,7 @@ import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.DokkaPlugin
import org.jetbrains.dokka.utilities.DokkaConsoleLogger
+import org.jetbrains.dokka.utilities.DokkaLogger
import org.junit.rules.TemporaryFolder
import testApi.logger.TestLogger
import java.io.File
@@ -20,7 +21,7 @@ import java.nio.file.Paths
// TODO: take dokka configuration from file
abstract class AbstractCoreTest {
- protected val logger = TestLogger(DokkaConsoleLogger)
+ protected var logger = TestLogger(DokkaConsoleLogger)
protected fun getTestDataDir(name: String) =
File("src/test/resources/$name").takeIf { it.exists() }?.toPath()
@@ -143,6 +144,7 @@ abstract class AbstractCoreTest {
var cacheRoot: String? = null
var pluginsClasspath: List<File> = emptyList()
var pluginsConfigurations: Map<String, String> = emptyMap()
+ var failOnWarning: Boolean = false
private val passesConfigurations = mutableListOf<PassConfigurationImpl>()
fun build() = DokkaConfigurationImpl(
outputDir = outputDir,
@@ -152,7 +154,8 @@ abstract class AbstractCoreTest {
passesConfigurations = passesConfigurations,
pluginsClasspath = pluginsClasspath,
pluginsConfiguration = pluginsConfigurations,
- modules = emptyList()
+ modules = emptyList(),
+ failOnWarning = failOnWarning
)
fun passes(block: Passes.() -> Unit) {