diff options
Diffstat (limited to 'plugins/base/src/main/kotlin')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt | 11 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt index 7ce21813..ddc0cd37 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt @@ -100,15 +100,14 @@ internal class ReportUndocumentedTransformer : DocumentableTransformer { } } - fun withAllDependentSourceSets(sourceSet: DokkaSourceSet): Sequence<DokkaSourceSet> { - return sequence { - yield(sourceSet) - for (dependentSourceSet in resolveDependentSourceSets(sourceSet)) { - yieldAll(withAllDependentSourceSets(dependentSourceSet)) - } + fun withAllDependentSourceSets(sourceSet: DokkaSourceSet): Sequence<DokkaSourceSet> = sequence { + yield(sourceSet) + for (dependentSourceSet in resolveDependentSourceSets(sourceSet)) { + yieldAll(withAllDependentSourceSets(dependentSourceSet)) } } + return withAllDependentSourceSets(sourceSet).all { sourceSetOrDependentSourceSet -> documentable.documentation[sourceSetOrDependentSourceSet]?.children?.isEmpty() ?: true } diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index 71c19bbe..0980083a 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -43,9 +43,9 @@ class DefaultPsiToDocumentableTranslator( override fun invoke(sourceSet: DokkaSourceSet, context: DokkaContext): DModule { - fun isFileInSourceRoots(file: File): Boolean { - return sourceSet.sourceRoots.any { root -> file.startsWith(root) } - } + fun isFileInSourceRoots(file: File): Boolean = + sourceSet.sourceRoots.any { root -> file.startsWith(root) } + val (environment, _) = kotlinAnalysis[sourceSet] @@ -298,8 +298,9 @@ class DefaultPsiToDocumentableTranslator( psiParameter.name, DocumentationNode( listOfNotNull(docs.firstChildOfTypeOrNull<Param> { - it.name == psiParameter.name - })).toSourceSetDependent(), + it.name == psiParameter.name + }) + ).toSourceSetDependent(), null, getBound(psiParameter.type), setOf(sourceSetData) |