aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-11-23 15:36:01 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-11-23 15:36:01 +0300
commitdc7ddcc57f07fc72e2c42f820b7852dd555a2891 (patch)
tree5c5d0fa27563a67cf9f50f6cf5d81f7a3f4e001d /core/src/main
parentf941d6adefa71d2b3b1cc69120edf7eae70187ba (diff)
downloaddokka-dc7ddcc57f07fc72e2c42f820b7852dd555a2891.tar.gz
dokka-dc7ddcc57f07fc72e2c42f820b7852dd555a2891.tar.bz2
dokka-dc7ddcc57f07fc72e2c42f820b7852dd555a2891.zip
Cleanup GH-222 a bit
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt8
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