diff --git a/save-plugins/fix-and-warn-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fixandwarn/FixAndWarnPlugin.kt b/save-plugins/fix-and-warn-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fixandwarn/FixAndWarnPlugin.kt index 3be6d5c18..c0ca1b87d 100644 --- a/save-plugins/fix-and-warn-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fixandwarn/FixAndWarnPlugin.kt +++ b/save-plugins/fix-and-warn-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fixandwarn/FixAndWarnPlugin.kt @@ -67,7 +67,7 @@ class FixAndWarnPlugin( override fun handleFiles(files: Sequence): Sequence { // Need to update private fields after validation initOrUpdateConfigs() - val expectedFiles = files.map { it as FixPlugin.FixTestFiles }.map { it.expected } + val expectedFiles = files.map { it as FixPlugin.Test }.map { it.expected } // Remove (in place) warnings from test files before fix plugin execution val filesAndTheirWarningsMap = removeWarningsFromExpectedFiles(expectedFiles) diff --git a/save-plugins/fix-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fix/FixPlugin.kt b/save-plugins/fix-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fix/FixPlugin.kt index 4c3edd68f..254486820 100644 --- a/save-plugins/fix-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fix/FixPlugin.kt +++ b/save-plugins/fix-plugin/src/commonMain/kotlin/org/cqfn/save/plugins/fix/FixPlugin.kt @@ -50,7 +50,7 @@ class FixPlugin( val fixPluginConfig = testConfig.pluginConfigs.filterIsInstance().single() val generalConfig = testConfig.pluginConfigs.filterIsInstance().single() - return files.map { it as FixTestFiles }.chunked(fixPluginConfig.batchSize!!.toInt()).map { chunk -> + return files.map { it as Test }.chunked(fixPluginConfig.batchSize!!.toInt()).map { chunk -> val pathMap = chunk.map { it.expected to it.test } val pathCopyMap = pathMap.map { (expected, test) -> expected to createTestFile(test, generalConfig) } val testCopyNames = @@ -172,19 +172,9 @@ class FixPlugin( .toList() .joinToString { (type, lines) -> "$type: $lines lines" } - /** - * @property expected expected file - */ - interface FixTestFiles : TestFiles { - /** - * path to expected file - */ - val expected: Path - } - /** * @property test test file * @property expected expected file */ - class Test(override val test: Path, override val expected: Path) : FixTestFiles + class Test(override val test: Path, val expected: Path) : TestFiles } diff --git a/save-plugins/fix-plugin/src/commonNonJsTest/kotlin/org/cqfn/save/plugins/fix/FixPluginTest.kt b/save-plugins/fix-plugin/src/commonNonJsTest/kotlin/org/cqfn/save/plugins/fix/FixPluginTest.kt index d7f716ad3..7106e29fc 100644 --- a/save-plugins/fix-plugin/src/commonNonJsTest/kotlin/org/cqfn/save/plugins/fix/FixPluginTest.kt +++ b/save-plugins/fix-plugin/src/commonNonJsTest/kotlin/org/cqfn/save/plugins/fix/FixPluginTest.kt @@ -171,7 +171,7 @@ class FixPluginTest { useInternalRedirections = false ) .discoverTestFiles(tmpDir) - .map { it as FixPlugin.FixTestFiles } + .map { it as FixPlugin.Test } .map { it.expected to it.test } .toList() }