diff --git a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt index 5b04f408022..f17fa8b1bb6 100644 --- a/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt +++ b/idea/idea-maven/src/org/jetbrains/kotlin/idea/maven/inspections/KotlinMavenPluginPhaseInspection.kt @@ -39,7 +39,8 @@ import org.jetbrains.idea.maven.utils.MavenArtifactScope import org.jetbrains.kotlin.idea.maven.PomFile import org.jetbrains.kotlin.idea.maven.configuration.KotlinMavenConfigurator import org.jetbrains.kotlin.idea.platform.tooling -import org.jetbrains.kotlin.idea.versions.* +import org.jetbrains.kotlin.idea.versions.MAVEN_JS_STDLIB_ID +import org.jetbrains.kotlin.idea.versions.MAVEN_STDLIB_ID import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind import java.util.* @@ -107,7 +108,8 @@ class KotlinMavenPluginPhaseInspection : DomElementsInspection goal.rawText == PomFile.KotlinGoals.Compile || goal.rawText == PomFile.KotlinGoals.Js } + && it.goals.goals.any { goal -> goal.rawText == PomFile.KotlinGoals.TestCompile || goal.rawText == PomFile.KotlinGoals.TestJs } }.forEach { badExecution -> - holder.createProblem( - badExecution.goals.createStableCopy(), - HighlightSeverity.WEAK_WARNING, - "It is not recommended to have both test and compile goals in the same execution" - ) - } + holder.createProblem( + badExecution.goals.createStableCopy(), + HighlightSeverity.WEAK_WARNING, + "It is not recommended to have both test and compile goals in the same execution" + ) + } } - private class AddExecutionLocalFix(val file: XmlFile, val module: Module, val kotlinPlugin: MavenDomPlugin, val goal: String) : - LocalQuickFix { + private class AddExecutionLocalFix( + val file: XmlFile, + val module: Module, + val kotlinPlugin: MavenDomPlugin, + val goal: String + ) : LocalQuickFix { override fun getName() = "Create $goal execution" override fun getFamilyName() = "Create kotlin execution" @@ -231,8 +237,12 @@ class KotlinMavenPluginPhaseInspection : DomElementsInspection