aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/DokkaBootstrapImpl.kt
diff options
context:
space:
mode:
authorMartin Bonnin <martin@mbonnin.net>2020-11-18 12:48:03 +0100
committerGitHub <noreply@github.com>2020-11-18 12:48:03 +0100
commit1959b914c0838be814d45f617517ac73fa33cd47 (patch)
tree899805a421b45625ceffd599520a3f3e3d237e5a /core/src/main/kotlin/DokkaBootstrapImpl.kt
parentd6c798e44381fd436a264229f94f19528382c136 (diff)
downloaddokka-1959b914c0838be814d45f617517ac73fa33cd47.tar.gz
dokka-1959b914c0838be814d45f617517ac73fa33cd47.tar.bz2
dokka-1959b914c0838be814d45f617517ac73fa33cd47.zip
Add matchingRegex (#598)
* add matchingRegex as a simpler replacement for `prefix` * remove useless check * added a note about the order of the matchingRegex
Diffstat (limited to 'core/src/main/kotlin/DokkaBootstrapImpl.kt')
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/core/src/main/kotlin/DokkaBootstrapImpl.kt
index 584d8b8c..6d6d8698 100644
--- a/core/src/main/kotlin/DokkaBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaBootstrapImpl.kt
@@ -7,11 +7,7 @@ import java.util.function.BiConsumer
fun parsePerPackageOptions(args: List<String>): List<PackageOptions> = args.map { it.split(",") }.map {
- val prefix = it.first()
- if (prefix == "")
- throw IllegalArgumentException(
- "Please do not register packageOptions with all match pattern, use global settings instead"
- )
+ val matchingRegex = it.first()
val args = it.subList(1, it.size)
@@ -28,7 +24,7 @@ fun parsePerPackageOptions(args: List<String>): List<PackageOptions> = args.map
?: DokkaDefaults.suppress
PackageOptionsImpl(
- prefix,
+ matchingRegex,
includeNonPublic = privateApi,
reportUndocumented = reportUndocumented,
skipDeprecated = !deprecated,