diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-28 11:38:40 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-10-29 11:57:21 +0100 |
commit | 0efda36cc309e117641f2226a451cf98e42c421e (patch) | |
tree | e6a0c8c2c228c27bc9ef02d116d5416a85152aee | |
parent | ae2ff5b82931666fc908750d39e31bd6dc39359f (diff) | |
download | dokka-0efda36cc309e117641f2226a451cf98e42c421e.tar.gz dokka-0efda36cc309e117641f2226a451cf98e42c421e.tar.bz2 dokka-0efda36cc309e117641f2226a451cf98e42c421e.zip |
exclude 'inline', 'noinline' and 'crossinline' from summary report; fix tests
-rw-r--r-- | src/Formats/StructuredFormatService.kt | 7 | ||||
-rw-r--r-- | src/Kotlin/KotlinLanguageService.kt | 4 | ||||
-rw-r--r-- | test/data/format/annotations.md | 4 | ||||
-rw-r--r-- | test/data/format/starProjection.kt | 2 | ||||
-rw-r--r-- | test/data/format/starProjection.md | 2 | ||||
-rw-r--r-- | test/data/format/summarizeSignatures.md | 3 |
6 files changed, 10 insertions, 12 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt index 5a8109dc..8473ccd5 100644 --- a/src/Formats/StructuredFormatService.kt +++ b/src/Formats/StructuredFormatService.kt @@ -259,10 +259,8 @@ public abstract class StructuredFormatService(locationService: LocationService, private fun appendSummarySignatures(items: List<DocumentationNode>, location: Location, to: StringBuilder) { val summarySignature = languageService.summarizeSignatures(items) if (summarySignature != null) { - val signatureAsCode = ContentCode() - signatureAsCode.append(summarySignature) - appendAsSignature(to, signatureAsCode) { - appendLine(to, signatureAsCode.signatureToText(location)) + appendAsSignature(to, summarySignature) { + appendLine(to, summarySignature.signatureToText(location)) } return } @@ -271,7 +269,6 @@ public abstract class StructuredFormatService(locationService: LocationService, appendAsSignature(to, it) { appendLine(to, it.signatureToText(location)) } - appendLine(to) } appendAsSignature(to, renderedSignatures.last()) { to.append(renderedSignatures.last().signatureToText(location)) diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt index 038ade9c..513e1a58 100644 --- a/src/Kotlin/KotlinLanguageService.kt +++ b/src/Kotlin/KotlinLanguageService.kt @@ -6,7 +6,7 @@ import org.jetbrains.dokka.LanguageService.RenderMode * Implements [LanguageService] and provides rendering of symbols in Kotlin language */ class KotlinLanguageService : LanguageService { - private val visibilityModifiers = setOf("public", "protected", "private") + private val fullOnlyModifiers = setOf("public", "protected", "private", "inline", "noinline", "crossinline") override fun render(node: DocumentationNode, renderMode: RenderMode): ContentNode { return content { @@ -258,7 +258,7 @@ class KotlinLanguageService : LanguageService { for (it in modifiers) { if (node.kind == org.jetbrains.dokka.DocumentationNode.Kind.Interface && it.name == "abstract") continue - if (renderMode == RenderMode.SUMMARY && it.name in visibilityModifiers) { + if (renderMode == RenderMode.SUMMARY && it.name in fullOnlyModifiers) { continue } renderModifier(it) diff --git a/test/data/format/annotations.md b/test/data/format/annotations.md index caf84084..b898d55c 100644 --- a/test/data/format/annotations.md +++ b/test/data/format/annotations.md @@ -16,11 +16,11 @@ ### Properties -| [x](test/-foo/x) | `inline val x: Int` | +| [x](test/-foo/x) | `val x: Int` | ### Functions -| [bar](test/-foo/bar) | `inline fun bar(noinline notInlined: () -> Unit): Unit` | +| [bar](test/-foo/bar) | `fun bar(notInlined: () -> Unit): Unit` | diff --git a/test/data/format/starProjection.kt b/test/data/format/starProjection.kt index 1532c830..48d53e47 100644 --- a/test/data/format/starProjection.kt +++ b/test/data/format/starProjection.kt @@ -1,3 +1,3 @@ -public inline fun Iterable<*>.containsFoo(element: Any?): Boolean { +public fun Iterable<*>.containsFoo(element: Any?): Boolean { return false } diff --git a/test/data/format/starProjection.md b/test/data/format/starProjection.md index 10114081..d6b5e9e5 100644 --- a/test/data/format/starProjection.md +++ b/test/data/format/starProjection.md @@ -4,5 +4,5 @@ ### Extensions for Iterable -| [containsFoo](test/-iterable/contains-foo) | `inline fun Iterable<*>.containsFoo(element: Any?): Boolean` | +| [containsFoo](test/-iterable/contains-foo) | `fun Iterable<*>.containsFoo(element: Any?): Boolean` | diff --git a/test/data/format/summarizeSignatures.md b/test/data/format/summarizeSignatures.md index 2dcb31a2..b1707f40 100644 --- a/test/data/format/summarizeSignatures.md +++ b/test/data/format/summarizeSignatures.md @@ -15,7 +15,8 @@ ### Functions -| [foo](test/kotlin/foo) | `fun <T> *any_array*<T>.foo(predicate: (T) -> Boolean): Boolean` +| [foo](test/kotlin/foo) | `fun <T> any_array<T>.foo(predicate: (T) -> Boolean): Boolean` + Returns true if foo. | |