From 4f71d4ff0d1e7ff4607b58eb7d030bd860e44f3a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 4 Apr 2020 03:02:28 +0000 Subject: CTAN sync 202004040302 --- .../islandoftex/arara/configuration/AraraSpec.kt | 90 ---------------------- 1 file changed, 90 deletions(-) delete mode 100644 support/arara/source/src/main/kotlin/org/islandoftex/arara/configuration/AraraSpec.kt (limited to 'support/arara/source/src/main/kotlin/org/islandoftex/arara/configuration/AraraSpec.kt') diff --git a/support/arara/source/src/main/kotlin/org/islandoftex/arara/configuration/AraraSpec.kt b/support/arara/source/src/main/kotlin/org/islandoftex/arara/configuration/AraraSpec.kt deleted file mode 100644 index 14100ec98b..0000000000 --- a/support/arara/source/src/main/kotlin/org/islandoftex/arara/configuration/AraraSpec.kt +++ /dev/null @@ -1,90 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package org.islandoftex.arara.configuration - -import com.uchuhimo.konf.ConfigSpec -import java.io.File -import java.nio.file.Paths -import kotlin.time.ExperimentalTime -import kotlin.time.milliseconds -import org.islandoftex.arara.localization.Language - -/** - * Configuration hierarchy for arara - * - * @author Island of TeX - * @version 5.0 - * @since 5.0 - */ -@Suppress("MagicNumber") -object AraraSpec : ConfigSpec() { - object Application : ConfigSpec() { - val defaultLanguageCode by optional("en") - val version by optional(AraraSpec::class.java.`package`.implementationVersion - ?: "DEVELOPMENT BUILD") - val namePattern by optional("arara:\\s") - val width by optional(65) - } - - object Execution : ConfigSpec() { - val maxLoops by optional(10) - val timeout by optional(false) - @ExperimentalTime - val timeoutValue by optional(0.milliseconds) - val haltOnErrors by optional(true) - - val databaseName by optional("arara") - val logName by optional("arara") - - val verbose by optional(false) - val language by optional(Language(Application.defaultLanguageCode.default)) - val logging by optional(false) - val dryrun by optional(false) - val status by optional(0) - val fileTypes by optional(ConfigurationUtils.defaultFileTypes) - val rulePaths by optional(setOf( - ConfigurationUtils.applicationPath.resolve("rules") - .toString() - )) - val preambles by optional(mapOf()) - val preamblesActive by optional(false) - val preamblesContent by optional("") - - val workingDirectory by optional(Paths.get("")) - val configurationName by optional("[none]") - val onlyHeader by optional(false) - - // TODO: these are runtime values, they should be properly - // initialized and tested (maybe move them into their own - // Spec or session) - val reference by optional(File("/tmp/")) - val file by optional(File("/tmp/")) - - object InfoSpec : ConfigSpec() { - val ruleId by optional(null) - val rulePath by optional(null) - } - - object DirectiveSpec : ConfigSpec() { - val lines by optional(listOf()) - } - - val filePattern by optional("") - } - - object Directive : ConfigSpec() { - val linebreakPattern by optional("^\\s*-->\\s(.*)$") - - private const val directivestart = """^\s*(\w+)\s*(:\s*(\{.*\})\s*)?""" - private const val pattern = """(\s+(if|while|until|unless)\s+(\S.*))?$""" - val directivePattern by optional(directivestart + pattern) - } - - object UserInteraction : ConfigSpec() { - val lookAndFeel by optional("none") - val displayTime by optional(false) - val displayLine by optional(true) - val displayResult by optional(false) - val displayRolling by optional(false) - val displayException by optional(false) - } -} -- cgit v1.2.3