@@ -18,29 +18,31 @@ import com.akuleshov7.ktoml.TomlInputConfig
1818import com.akuleshov7.ktoml.exceptions.TomlDecodingException
1919import com.akuleshov7.ktoml.file.TomlFileReader
2020import com.akuleshov7.ktoml.parsers.TomlParser
21- import com.akuleshov7.ktoml.tree.TomlTable
21+ import com.akuleshov7.ktoml.tree.nodes. TomlTable
2222import okio.FileSystem
2323import okio.Path
2424
2525import kotlinx.serialization.ExperimentalSerializationApi
2626import kotlinx.serialization.serializer
2727
2828private fun Path.testConfigFactory (table : TomlTable ) =
29- when (table.fullTableName.uppercase().replace(" \" " , " " )) {
29+ when (table.fullTableName()
30+ .uppercase()
31+ .replace(" \" " , " " )) {
3032 TestConfigSections .FIX .name -> this .createPluginConfig<FixPluginConfig >(
31- table.fullTableName
33+ table.fullTableName()
3234 )
3335 TestConfigSections .`FIX AND WARN `.name -> this .createPluginConfig<FixAndWarnPluginConfig >(
34- table.fullTableName
36+ table.fullTableName()
3537 )
3638 TestConfigSections .WARN .name -> this .createPluginConfig<WarnPluginConfig >(
37- table.fullTableName
39+ table.fullTableName()
3840 )
3941 TestConfigSections .GENERAL .name -> this .createPluginConfig<GeneralConfig >(
40- table.fullTableName
42+ table.fullTableName()
4143 )
4244 else -> throw PluginException (
43- " Received unknown plugin section name in the input: [${table.fullTableName} ]." +
45+ " Received unknown plugin section name in the input: [${table.fullTableName() } ]." +
4446 " Please check your <$this > config"
4547 )
4648 }
@@ -67,6 +69,8 @@ private inline fun <reified T : PluginConfig> Path.createPluginConfig(
6769 throw e
6870}
6971
72+ private fun TomlTable.fullTableName (): String = fullTableKey.toString()
73+
7074/* *
7175 * Create the list of plugins from toml file with plugin sections
7276 *
0 commit comments