Refactoring: better name for SameVersionInspection
It now has better suppression string
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.idea.maven.PomFile
|
|||||||
import org.jetbrains.kotlin.idea.maven.configuration.KotlinJavaMavenConfigurator
|
import org.jetbrains.kotlin.idea.maven.configuration.KotlinJavaMavenConfigurator
|
||||||
import org.jetbrains.kotlin.idea.maven.configuration.KotlinMavenConfigurator
|
import org.jetbrains.kotlin.idea.maven.configuration.KotlinMavenConfigurator
|
||||||
|
|
||||||
class SameVersionInspection : DomElementsInspection<MavenDomProjectModel>(MavenDomProjectModel::class.java) {
|
class DifferentMavenStdlibVersionInspection : DomElementsInspection<MavenDomProjectModel>(MavenDomProjectModel::class.java) {
|
||||||
override fun checkFileElement(domFileElement: DomFileElement<MavenDomProjectModel>?, holder: DomElementAnnotationHolder?) {
|
override fun checkFileElement(domFileElement: DomFileElement<MavenDomProjectModel>?, holder: DomElementAnnotationHolder?) {
|
||||||
if (domFileElement == null || holder == null) {
|
if (domFileElement == null || holder == null) {
|
||||||
return
|
return
|
||||||
+6
@@ -83,6 +83,12 @@ public class KotlinMavenInspectionTestGenerated extends AbstractKotlinMavenInspe
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("sameVersionPluginLibrarySuppression.xml")
|
||||||
|
public void testSameVersionPluginLibrarySuppression() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrarySuppression.xml");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("wrongJsExecution.xml")
|
@TestMetadata("wrongJsExecution.xml")
|
||||||
public void testWrongJsExecution() throws Exception {
|
public void testWrongJsExecution() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/wrongJsExecution.xml");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/wrongJsExecution.xml");
|
||||||
|
|||||||
+1
-1
@@ -32,6 +32,6 @@
|
|||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
<!-- inspection: org.jetbrains.kotlin.idea.maven.inspections.SameVersionInspection -->
|
<!-- inspection: org.jetbrains.kotlin.idea.maven.inspections.DifferentMavenStdlibVersionInspection -->
|
||||||
<!-- problem: on ${kotlin.version.1}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
<!-- problem: on ${kotlin.version.1}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
||||||
<!-- problem: on ${kotlin.version.2}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
<!-- problem: on ${kotlin.version.2}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
||||||
+1
-1
@@ -32,6 +32,6 @@
|
|||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
<!-- inspection: org.jetbrains.kotlin.idea.maven.inspections.SameVersionInspection -->
|
<!-- inspection: org.jetbrains.kotlin.idea.maven.inspections.DifferentMavenStdlibVersionInspection -->
|
||||||
<!-- problem: on ${kotlin.version.1}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
<!-- problem: on ${kotlin.version.1}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
||||||
<!-- problem: on ${kotlin.version.2}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
<!-- problem: on ${kotlin.version.2}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
||||||
@@ -32,6 +32,6 @@
|
|||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
<!-- inspection: org.jetbrains.kotlin.idea.maven.inspections.SameVersionInspection -->
|
<!-- inspection: org.jetbrains.kotlin.idea.maven.inspections.DifferentMavenStdlibVersionInspection -->
|
||||||
<!-- problem: on ${kotlin.version.1}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
<!-- problem: on ${kotlin.version.1}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
||||||
<!-- problem: on ${kotlin.version.2}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
<!-- problem: on ${kotlin.version.2}, title Plugin version (1.0.1) is not the same as library version (1.0.1-2) -->
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>org.jetbrains.kotlin.test</groupId>
|
||||||
|
<artifactId>configure-maven-test</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<kotlin.version.1>1.0.1</kotlin.version.1>
|
||||||
|
<kotlin.version.2>1.0.1-2</kotlin.version.2>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
|
<!--suppress DifferentMavenStdlibVersion -->
|
||||||
|
<version>${kotlin.version.2}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-maven-plugin</artifactId>
|
||||||
|
<!--suppress DifferentMavenStdlibVersion -->
|
||||||
|
<version>${kotlin.version.1}</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<!-- inspection: org.jetbrains.kotlin.idea.maven.inspections.DifferentMavenStdlibVersionInspection -->
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
hasStaticDescription="true"
|
hasStaticDescription="true"
|
||||||
level="WARNING" />
|
level="WARNING" />
|
||||||
|
|
||||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.maven.inspections.SameVersionInspection"
|
<localInspection implementationClass="org.jetbrains.kotlin.idea.maven.inspections.DifferentMavenStdlibVersionInspection"
|
||||||
displayName="Library and maven plugin versions are different"
|
displayName="Library and maven plugin versions are different"
|
||||||
groupName="Kotlin"
|
groupName="Kotlin"
|
||||||
enabledByDefault="true"
|
enabledByDefault="true"
|
||||||
|
|||||||
Reference in New Issue
Block a user