diff options
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index 8d34a6f1..2998e314 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -789,9 +789,9 @@ val visibleToDocumentation = setOf(Visibilities.PROTECTED, Visibilities.PUBLIC) fun DeclarationDescriptor.isDocumented(options: DocumentationOptions): Boolean { return (options.effectivePackageOptions(fqNameSafe).includeNonPublic || this !is MemberDescriptor - || this.visibility in visibleToDocumentation) && - !isDocumentationSuppressed(options) && !options.effectivePackageOptions(fqNameSafe).suppress && - (!options.effectivePackageOptions(fqNameSafe).skipDeprecated || !isDeprecated()) + || this.visibility in visibleToDocumentation) + && !isDocumentationSuppressed(options) + && (!options.effectivePackageOptions(fqNameSafe).skipDeprecated || !isDeprecated()) } private fun DeclarationDescriptor.isGenerated() = this is CallableMemberDescriptor && kind != CallableMemberDescriptor.Kind.DECLARATION @@ -861,6 +861,8 @@ fun AnnotationDescriptor.mustBeDocumented(): Boolean { fun DeclarationDescriptor.isDocumentationSuppressed(options: DocumentationOptions): Boolean { + if (options.effectivePackageOptions(fqNameSafe).suppress) return true + val path = this.findPsi()?.containingFile?.virtualFile?.path if (path != null) { if (File(path).absoluteFile in options.suppressedFiles) return true |