From a3cb0253b9772f975fe08cd47334e3b9fa7e0ed6 Mon Sep 17 00:00:00 2001 From: Roman Golyshev Date: Sat, 13 Jul 2024 12:00:18 +0200 Subject: [PATCH] KTIJ-30535 [kotlin] Move `SuspiciousCollectionReassignmentInspection` to the shared inspections module Do not move the testdata to the shared place; regenerate it independently instead ^KTIJ-30535 Fixed GitOrigin-RevId: 95f224416fa46598fc346180beaf4733cb2d58b2 --- .../tests/K2LocalInspectionTestGenerated.java | 69 +++++ .../tests/K2QuickFixTestGenerated.java | 249 ++++++++++++++++++ ...kotlin.code-insight.inspections.shared.xml | 9 + ...piciousCollectionReassignmentInspection.kt | 4 +- .../.inspection | 2 +- .../.k2Inspection | 1 + .../changeTypeToMutable/hasType.kt | 5 +- .../changeTypeToMutable/hasType.kt.after | 5 +- .../changeTypeToMutable/hasType2.kt | 5 +- .../changeTypeToMutable/hasType2.kt.after | 5 +- .../changeTypeToMutable/mutableListOf.kt | 5 +- .../mutableListOf.kt.after | 5 +- .../changeTypeToMutable/mutableMapOf.kt | 5 +- .../changeTypeToMutable/mutableMapOf.kt.after | 5 +- .../changeTypeToMutable/mutableSetOf.kt | 5 +- .../changeTypeToMutable/mutableSetOf.kt.after | 5 +- .../changeTypeToMutable/noInitializer.kt | 2 +- .../changeTypeToMutable/notLocal.kt | 2 +- .../changeTypeToMutable/toMutableList.kt | 5 +- .../toMutableList.kt.after | 5 +- .../changeTypeToMutable/toMutableList2.kt | 5 +- .../toMutableList2.kt.after | 5 +- .../changeTypeToMutable/toMutableMap.kt | 5 +- .../changeTypeToMutable/toMutableMap.kt.after | 5 +- .../changeTypeToMutable/toMutableSet.kt | 5 +- .../changeTypeToMutable/toMutableSet.kt.after | 5 +- .../joinWithInitializer/noInitializer.kt | 2 +- .../joinWithInitializer/notLocal.kt | 2 +- .../joinWithInitializer/simple.kt | 5 +- .../joinWithInitializer/simple.kt.after | 5 +- .../joinWithInitializer/used.kt | 2 +- .../replaceWithAssignment/differentType.kt | 2 +- .../replaceWithAssignment/emptyList.kt | 5 +- .../replaceWithAssignment/emptyList.kt.after | 5 +- .../replaceWithAssignment/emptyListOf.kt | 5 +- .../emptyListOf.kt.after | 5 +- .../replaceWithAssignment/emptyMap.kt | 5 +- .../replaceWithAssignment/emptyMap.kt.after | 5 +- .../replaceWithAssignment/emptyMapOf.kt | 5 +- .../replaceWithAssignment/emptyMapOf.kt.after | 5 +- .../replaceWithAssignment/emptySet.kt | 5 +- .../replaceWithAssignment/emptySet.kt.after | 5 +- .../replaceWithAssignment/emptySetOf.kt | 5 +- .../replaceWithAssignment/emptySetOf.kt.after | 5 +- .../replaceWithAssignment/listOf.kt | 2 +- .../replaceWithAssignment/mapOf.kt | 2 +- .../replaceWithAssignment/minusEq.kt | 2 +- .../replaceWithAssignment/notEmpty.kt | 2 +- .../replaceWithAssignment/setOf.kt | 2 +- .../replaceWithAssignment/used.kt | 2 +- .../replaceWithFilter/map.kt | 2 +- .../replaceWithFilter/minusEq.kt | 5 +- .../replaceWithFilter/minusEq.kt.after | 5 +- .../replaceWithFilter/notIterable.kt | 2 +- .../replaceWithFilter/plusEq.kt | 2 +- .../replaceWithOrdinaryAssignment/simple.kt | 5 +- .../simple.kt.after | 5 +- .../resources/META-INF/inspections-fe10.xml | 8 - .../codeinsight/GenerateK2InspectionTests.kt | 2 + 59 files changed, 456 insertions(+), 98 deletions(-) rename plugins/kotlin/{idea/src/org/jetbrains/kotlin/idea/inspections => code-insight/inspections-shared/src/org/jetbrains/kotlin/idea/codeInsight/inspections/shared}/SuspiciousCollectionReassignmentInspection.kt (98%) create mode 100644 plugins/kotlin/idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/.k2Inspection diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/inspections/tests/K2LocalInspectionTestGenerated.java b/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/inspections/tests/K2LocalInspectionTestGenerated.java index 6462089d4832..eabfb6ac075e 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/inspections/tests/K2LocalInspectionTestGenerated.java +++ b/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/inspections/tests/K2LocalInspectionTestGenerated.java @@ -6439,6 +6439,75 @@ public abstract class K2LocalInspectionTestGenerated extends AbstractK2LocalInsp } } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment") + public static class SuspiciousCollectionReassignment extends AbstractK2LocalInspectionTest { + @java.lang.Override + @org.jetbrains.annotations.NotNull + public final KotlinPluginMode getPluginMode() { + return KotlinPluginMode.K2; + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("hasError.kt") + public void testHasError() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/hasError.kt"); + } + + @TestMetadata("hasError_ni.kt") + public void testHasError_ni() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/hasError_ni.kt"); + } + + @TestMetadata("int.kt") + public void testInt() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/int.kt"); + } + + @TestMetadata("minus.kt") + public void testMinus() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/minus.kt"); + } + + @TestMetadata("mutableList.kt") + public void testMutableList() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/mutableList.kt"); + } + + @TestMetadata("mutableMap.kt") + public void testMutableMap() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/mutableMap.kt"); + } + + @TestMetadata("mutableSet.kt") + public void testMutableSet() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/mutableSet.kt"); + } + + @TestMetadata("notLocal.kt") + public void testNotLocal() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/notLocal.kt"); + } + + @TestMetadata("plus.kt") + public void testPlus() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/plus.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/simple.kt"); + } + + @TestMetadata("val.kt") + public void testVal() throws Exception { + runTest("../../../idea/tests/testData/inspectionsLocal/suspiciousCollectionReassignment/val.kt"); + } + } + @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("../../../idea/tests/testData/inspectionsLocal/canBeParameter") public static class CanBeParameter extends AbstractK2LocalInspectionTest { diff --git a/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/quickfix/tests/K2QuickFixTestGenerated.java b/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/quickfix/tests/K2QuickFixTestGenerated.java index 383dd0a0bdda..890a824789f3 100644 --- a/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/quickfix/tests/K2QuickFixTestGenerated.java +++ b/plugins/kotlin/code-insight/inspections-k2/tests/test/org/jetbrains/kotlin/idea/k2/quickfix/tests/K2QuickFixTestGenerated.java @@ -1362,6 +1362,255 @@ public abstract class K2QuickFixTestGenerated extends AbstractK2QuickFixTest { } } + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment") + public abstract static class SuspiciousCollectionReassignment extends AbstractK2QuickFixTest { + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable") + public static class ChangeTypeToMutable extends AbstractK2QuickFixTest { + @java.lang.Override + @org.jetbrains.annotations.NotNull + public final KotlinPluginMode getPluginMode() { + return KotlinPluginMode.K2; + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("hasType.kt") + public void testHasType() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType.kt"); + } + + @TestMetadata("hasType2.kt") + public void testHasType2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt"); + } + + @TestMetadata("mutableListOf.kt") + public void testMutableListOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt"); + } + + @TestMetadata("mutableMapOf.kt") + public void testMutableMapOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt"); + } + + @TestMetadata("mutableSetOf.kt") + public void testMutableSetOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt"); + } + + @TestMetadata("noInitializer.kt") + public void testNoInitializer() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt"); + } + + @TestMetadata("notLocal.kt") + public void testNotLocal() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt"); + } + + @TestMetadata("toMutableList.kt") + public void testToMutableList() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt"); + } + + @TestMetadata("toMutableList2.kt") + public void testToMutableList2() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt"); + } + + @TestMetadata("toMutableMap.kt") + public void testToMutableMap() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt"); + } + + @TestMetadata("toMutableSet.kt") + public void testToMutableSet() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer") + public static class JoinWithInitializer extends AbstractK2QuickFixTest { + @java.lang.Override + @org.jetbrains.annotations.NotNull + public final KotlinPluginMode getPluginMode() { + return KotlinPluginMode.K2; + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("noInitializer.kt") + public void testNoInitializer() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt"); + } + + @TestMetadata("notLocal.kt") + public void testNotLocal() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt"); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt"); + } + + @TestMetadata("used.kt") + public void testUsed() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment") + public static class ReplaceWithAssignment extends AbstractK2QuickFixTest { + @java.lang.Override + @org.jetbrains.annotations.NotNull + public final KotlinPluginMode getPluginMode() { + return KotlinPluginMode.K2; + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("differentType.kt") + public void testDifferentType() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt"); + } + + @TestMetadata("emptyList.kt") + public void testEmptyList() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt"); + } + + @TestMetadata("emptyListOf.kt") + public void testEmptyListOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt"); + } + + @TestMetadata("emptyMap.kt") + public void testEmptyMap() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt"); + } + + @TestMetadata("emptyMapOf.kt") + public void testEmptyMapOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt"); + } + + @TestMetadata("emptySet.kt") + public void testEmptySet() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt"); + } + + @TestMetadata("emptySetOf.kt") + public void testEmptySetOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt"); + } + + @TestMetadata("listOf.kt") + public void testListOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt"); + } + + @TestMetadata("mapOf.kt") + public void testMapOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt"); + } + + @TestMetadata("minusEq.kt") + public void testMinusEq() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt"); + } + + @TestMetadata("noInitializer.kt") + public void testNoInitializer() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/noInitializer.kt"); + } + + @TestMetadata("notEmpty.kt") + public void testNotEmpty() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt"); + } + + @TestMetadata("notLocal.kt") + public void testNotLocal() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notLocal.kt"); + } + + @TestMetadata("setOf.kt") + public void testSetOf() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt"); + } + + @TestMetadata("used.kt") + public void testUsed() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter") + public static class ReplaceWithFilter extends AbstractK2QuickFixTest { + @java.lang.Override + @org.jetbrains.annotations.NotNull + public final KotlinPluginMode getPluginMode() { + return KotlinPluginMode.K2; + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("map.kt") + public void testMap() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt"); + } + + @TestMetadata("minusEq.kt") + public void testMinusEq() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt"); + } + + @TestMetadata("notIterable.kt") + public void testNotIterable() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt"); + } + + @TestMetadata("plusEq.kt") + public void testPlusEq() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt"); + } + } + + @RunWith(JUnit3RunnerWithInners.class) + @TestMetadata("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment") + public static class ReplaceWithOrdinaryAssignment extends AbstractK2QuickFixTest { + @java.lang.Override + @org.jetbrains.annotations.NotNull + public final KotlinPluginMode getPluginMode() { + return KotlinPluginMode.K2; + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + runTest("../../../idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt"); + } + } + } + @RunWith(JUnit3RunnerWithInners.class) @TestMetadata("../../../idea/tests/testData/quickfix/removeAnnotation") public static class RemoveAnnotation extends AbstractK2QuickFixTest { diff --git a/plugins/kotlin/code-insight/inspections-shared/resources/kotlin.code-insight.inspections.shared.xml b/plugins/kotlin/code-insight/inspections-shared/resources/kotlin.code-insight.inspections.shared.xml index d665382d0e6c..05c5d43a0664 100644 --- a/plugins/kotlin/code-insight/inspections-shared/resources/kotlin.code-insight.inspections.shared.xml +++ b/plugins/kotlin/code-insight/inspections-shared/resources/kotlin.code-insight.inspections.shared.xml @@ -354,6 +354,15 @@ groupPath="Kotlin" groupKey="group.names.redundant.constructs" groupBundle="messages.KotlinBundle" level="WEAK WARNING" enabledByDefault="true" key="inspection.complex.redundant.let.display.name" bundle="messages.KotlinBundle"/> + + + = listOf(1) list += 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType.kt.after index ba5a9718db45..30d08f8ad55d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType.kt.after @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { val list: MutableList = mutableListOf(1) list += 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt index 6debcf5cf8cb..7ff1b394c097 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var list = listOf(1) list += 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt.after index cb0dd2779679..16889a32007c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/hasType2.kt.after @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { val list = mutableListOf(1) list += 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt index cb8f18463f71..a236603f456e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var list = listOf(1) list += 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt.after index e74d9d88e0fa..ce599a5ff0ba 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableListOf.kt.after @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { val list = mutableListOf(1) list += 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt index fa1bff1dc38b..bda59d877b75 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var map = mapOf(1 to 2) map += 3 to 4 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt.after index 0e91ee561f6d..d95eb7d44c67 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableMapOf.kt.after @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { val map = mutableMapOf(1 to 2) map += 3 to 4 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt index cd2366a99928..03312c0d596a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var set = setOf(1) set += 1 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt.after index 30e0398deee9..96a3c6cbeb41 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/mutableSetOf.kt.after @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { val set = mutableSetOf(1) set += 1 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt index 53063f3fa6aa..536963649ad4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/noInitializer.kt @@ -1,5 +1,5 @@ // "Change type to mutable" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt index 8a2e562a1e1b..c335182b7ca3 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/notLocal.kt @@ -1,5 +1,5 @@ // "Change type to mutable" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt index b3e48799ce53..26b27d291a70 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt @@ -1,5 +1,5 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var list = foo() @@ -7,4 +7,5 @@ fun test() { } fun foo() = listOf(1) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt.after index 45972314db38..4a1e8a605dcc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList.kt.after @@ -1,5 +1,5 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { val list = foo().toMutableList() @@ -7,4 +7,5 @@ fun test() { } fun foo() = listOf(1) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt index 413551aba1c0..5a5652165ef6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(a: Any) { var list = a as List list -= 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt.after index a5cfcf277ca1..bba6ce4b2aa6 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableList2.kt.after @@ -1,8 +1,9 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(a: Any) { val list = (a as List).toMutableList() list -= 2 } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt index 9d6430ecb685..448807e784a9 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt @@ -1,5 +1,5 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun toMutableMap() { var map = foo() @@ -7,4 +7,5 @@ fun toMutableMap() { } fun foo() = mapOf(1 to 2) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt.after index f63f5545b5ea..5609085b0b75 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableMap.kt.after @@ -1,5 +1,5 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun toMutableMap() { val map = foo().toMutableMap() @@ -7,4 +7,5 @@ fun toMutableMap() { } fun foo() = mapOf(1 to 2) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt index d6879e321b37..f9f7c399f621 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt @@ -1,5 +1,5 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var set = foo() @@ -7,4 +7,5 @@ fun test() { } fun foo() = setOf(1) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt.after index 8b9c0a3bc0fb..43eb4aea0b6f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/changeTypeToMutable/toMutableSet.kt.after @@ -1,5 +1,5 @@ // "Change type to mutable" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { val set = foo().toMutableSet() @@ -7,4 +7,5 @@ fun test() { } fun foo() = setOf(1) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ChangeTypeToMutableFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt index 1d1ed03311b7..9fa3cb6f8fbc 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/noInitializer.kt @@ -1,5 +1,5 @@ // "Join with initializer" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt index 060a2cc107c2..545896d90b3b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/notLocal.kt @@ -1,5 +1,5 @@ // "Join with initializer" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment // WITH_STDLIB diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt index f0b05e361527..53d65a0f04f7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt @@ -1,5 +1,5 @@ // "Join with initializer" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: List) { var list = createList() @@ -8,4 +8,5 @@ fun test(otherList: List) { } fun createList(): List = listOf(1, 2, 3) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$JoinWithInitializerFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$JoinWithInitializerFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$JoinWithInitializerFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt.after index 99c68fa8d66b..5e01e47c8a40 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/simple.kt.after @@ -1,5 +1,5 @@ // "Join with initializer" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: List) { var list = createList() + otherList @@ -7,4 +7,5 @@ fun test(otherList: List) { } fun createList(): List = listOf(1, 2, 3) -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$JoinWithInitializerFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$JoinWithInitializerFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$JoinWithInitializerFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt index 258a552cbe5d..8f70042cec80 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/joinWithInitializer/used.kt @@ -1,5 +1,5 @@ // "Join with initializer" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt index 0f0ef843cf2c..55fccd3eb963 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/differentType.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt index ff07ed3d6dbf..74155709a02c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: List) { var list = emptyList() @@ -10,4 +10,5 @@ fun test(otherList: List) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt.after index c753c40e31b0..0caf61e83c1f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyList.kt.after @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: List) { var list = emptyList() @@ -10,4 +10,5 @@ fun test(otherList: List) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt index 959422cbd30d..87f86e43b752 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: List) { var list = listOf() @@ -10,4 +10,5 @@ fun test(otherList: List) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt.after index 9b70a8646799..cbe68416062e 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyListOf.kt.after @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: List) { var list = listOf() @@ -10,4 +10,5 @@ fun test(otherList: List) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt index 2d068d980de0..62b01ab92be7 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherMap: Map) { var list = emptyMap() @@ -10,4 +10,5 @@ fun test(otherMap: Map) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt.after index 02447b61a5a2..23231dca3afe 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMap.kt.after @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherMap: Map) { var list = emptyMap() @@ -10,4 +10,5 @@ fun test(otherMap: Map) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt index eeba5e0964ac..29f4cdb2176b 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherMap: Map) { var list = mapOf() @@ -10,4 +10,5 @@ fun test(otherMap: Map) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt.after index d349fbb3e59c..7b46c40b73ab 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptyMapOf.kt.after @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherMap: Map) { var list = mapOf() @@ -10,4 +10,5 @@ fun test(otherMap: Map) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt index df5228624211..0c5eda1872d4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: Set) { var list = emptySet() @@ -10,4 +10,5 @@ fun test(otherList: Set) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt.after index 25a2ae965915..27ba30b8bfb8 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySet.kt.after @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: Set) { var list = emptySet() @@ -10,4 +10,5 @@ fun test(otherList: Set) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt index 354350862aeb..a6ce7d03d234 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: Set) { var list = setOf() @@ -10,4 +10,5 @@ fun test(otherList: Set) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt.after index b1379ad33af4..5a1397191e5c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/emptySetOf.kt.after @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test(otherList: Set) { var list = setOf() @@ -10,4 +10,5 @@ fun test(otherList: Set) { fun foo() {} fun bar() {} -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithAssignmentFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt index ffc1a58e28e9..18d46de12cc2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/listOf.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt index 0eee25501085..1a5647770ab2 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/mapOf.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt index 57c12fe2ad18..b161bd9a9fb4 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/minusEq.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with filter diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt index 4a2682a1168f..d2ad1479d329 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/notEmpty.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt index 9c69711459e9..7a3f79e19c39 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/setOf.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt index 538571bc7adf..8ab9ebe75d2a 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithAssignment/used.kt @@ -1,5 +1,5 @@ // "Replace with assignment (original is empty)" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Replace overloaded operator with function call // ACTION: Replace with ordinary assignment diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt index bc581929ed8d..5e7dc0803f39 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/map.kt @@ -1,5 +1,5 @@ // "Replace with filter" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Join with initializer // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt index ef8b308a8a43..212ba673845c 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt @@ -1,8 +1,9 @@ // "Replace with filter" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var list = listOf(1, 2, 3) list -= listOf(2) } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithFilterFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithFilterFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithFilterFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt.after index 3c90a7fb90bc..a9ac20a39494 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/minusEq.kt.after @@ -1,8 +1,9 @@ // "Replace with filter" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // WITH_STDLIB fun test() { var list = listOf(1, 2, 3) list = list.filter { it !in listOf(2) } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection$ReplaceWithFilterFix \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithFilterFix +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection$ReplaceWithFilterFix \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt index 45347de6f551..10e09ca133ba 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/notIterable.kt @@ -1,5 +1,5 @@ // "Replace with filter" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Join with initializer // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt index 29f3576abe4e..c2aaf917ad48 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithFilter/plusEq.kt @@ -1,5 +1,5 @@ // "Replace with filter" "false" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Join with initializer // ACTION: Replace overloaded operator with function call diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt index 984496a4d72c..6cd0ba505f0f 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt @@ -1,5 +1,5 @@ // "Replace with ordinary assignment" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Remove braces from 'if' statement // ACTION: Replace overloaded operator with function call @@ -12,4 +12,5 @@ fun test(otherList: List, flag: Boolean) { } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceWithOrdinaryAssignmentIntention \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceWithOrdinaryAssignmentIntention +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceWithOrdinaryAssignmentIntention \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after index feca6a657b5b..64abde7e229d 100644 --- a/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after +++ b/plugins/kotlin/idea/tests/testData/quickfix/suspiciousCollectionReassignment/replaceWithOrdinaryAssignment/simple.kt.after @@ -1,5 +1,5 @@ // "Replace with ordinary assignment" "true" -// TOOL: org.jetbrains.kotlin.idea.inspections.SuspiciousCollectionReassignmentInspection +// TOOL: org.jetbrains.kotlin.idea.codeInsight.inspections.shared.SuspiciousCollectionReassignmentInspection // ACTION: Change type to mutable // ACTION: Remove braces from 'if' statement // ACTION: Replace overloaded operator with function call @@ -12,4 +12,5 @@ fun test(otherList: List, flag: Boolean) { } } -// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceWithOrdinaryAssignmentIntention \ No newline at end of file +// FUS_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceWithOrdinaryAssignmentIntention +// FUS_K2_QUICKFIX_NAME: org.jetbrains.kotlin.idea.codeInsight.intentions.shared.ReplaceWithOrdinaryAssignmentIntention \ No newline at end of file diff --git a/plugins/kotlin/plugin/k1/resources/META-INF/inspections-fe10.xml b/plugins/kotlin/plugin/k1/resources/META-INF/inspections-fe10.xml index 80bde4305012..2ac6e8da3754 100644 --- a/plugins/kotlin/plugin/k1/resources/META-INF/inspections-fe10.xml +++ b/plugins/kotlin/plugin/k1/resources/META-INF/inspections-fe10.xml @@ -2270,14 +2270,6 @@ language="kotlin" key="inspection.redundant.else.in.if.display.name" bundle="messages.KotlinBundle"/> - -