diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt | 2 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt index a8fabc95..f80cb6df 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt @@ -159,6 +159,6 @@ internal class ReportUndocumentedTransformer : DocumentableTransformer { val packageName = documentable.dri.packageName ?: return null return dokkaSourceSet.perPackageOptions .filter { packageOptions -> Regex(packageOptions.matchingRegex).matches(packageName) } - .maxBy { packageOptions -> packageOptions.matchingRegex.length } + .maxByOrNull { packageOptions -> packageOptions.matchingRegex.length } } } diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt index a391b534..cadd3de0 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/samples/DefaultSamplesTransformer.kt @@ -13,7 +13,7 @@ class DefaultSamplesTransformer(context: DokkaContext) : SamplesTransformer(cont override fun processBody(psiElement: PsiElement): String { val text = processSampleBody(psiElement).trim { it == '\n' || it == '\r' }.trimEnd() val lines = text.split("\n") - val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.min() ?: 0 + val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.minOrNull() ?: 0 return lines.joinToString("\n") { it.drop(indent) } } |