From 1959b914c0838be814d45f617517ac73fa33cd47 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Wed, 18 Nov 2020 12:48:03 +0100 Subject: Add matchingRegex (#598) * add matchingRegex as a simpler replacement for `prefix` * remove useless check * added a note about the order of the matchingRegex --- core/src/main/kotlin/DokkaBootstrapImpl.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'core/src/main/kotlin/DokkaBootstrapImpl.kt') 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): List = 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): List = args.map ?: DokkaDefaults.suppress PackageOptionsImpl( - prefix, + matchingRegex, includeNonPublic = privateApi, reportUndocumented = reportUndocumented, skipDeprecated = !deprecated, -- cgit