aboutsummaryrefslogtreecommitdiff
path: root/runners
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-05-31 13:53:07 +0200
committerGitHub <noreply@github.com>2023-05-31 13:53:07 +0200
commit63bed7cb2e47eb46772e680982c33ed3ee624c31 (patch)
tree3355f5c18c9d755caffa6f2fb6ca24a2f91a1acc /runners
parentf45750699d089e0101dcde5d38c7e08ec2f03708 (diff)
downloaddokka-63bed7cb2e47eb46772e680982c33ed3ee624c31.tar.gz
dokka-63bed7cb2e47eb46772e680982c33ed3ee624c31.tar.bz2
dokka-63bed7cb2e47eb46772e680982c33ed3ee624c31.zip
Fix missing tab entries for module names with space (#3019)
Diffstat (limited to 'runners')
-rw-r--r--runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt6
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt6
2 files changed, 12 insertions, 0 deletions
diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt b/runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt
index 49e8f2ae..120bd296 100644
--- a/runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt
+++ b/runners/cli/src/main/kotlin/org/jetbrains/dokka/SourceSetArgumentsParser.kt
@@ -7,6 +7,12 @@ import kotlinx.cli.delimiter
internal fun parseSourceSet(moduleName: String, args: Array<String>): DokkaConfiguration.DokkaSourceSet {
+ if (moduleName.contains(',')) {
+ // To figure out why this is needed and if it is still relevant, see the comment here:
+ // https://github.com/Kotlin/dokka/issues/3011#issuecomment-1568620493
+ throw IllegalArgumentException("Module name cannot contain commas as it is used internally as a delimiter.")
+ }
+
val parser = ArgParser("sourceSet", prefixStyle = ArgParser.OptionPrefixStyle.JVM)
val sourceSetName by parser.option(
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index c82f1b59..64293332 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -353,6 +353,12 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
}
}
+ if (moduleName.contains(',')) {
+ // To figure out why this is needed and if it is still relevant, see the comment here:
+ // https://github.com/Kotlin/dokka/issues/3011#issuecomment-1568620493
+ throw IllegalArgumentException("Module name cannot contain commas as it is used internally as a delimiter.")
+ }
+
fun defaultLinks(config: DokkaSourceSetImpl): Set<ExternalDocumentationLinkImpl> {
val links = mutableSetOf<ExternalDocumentationLinkImpl>()
if (!config.noJdkLink)