mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make IG test light
This commit is contained in:
+1
-1
@@ -8,4 +8,4 @@ public class EmptyClass {
|
||||
}
|
||||
class MyList extends java.util.ArrayList<String> {}
|
||||
class MyException extends java.lang.Exception {}
|
||||
abstract class ReportMe implements java.util.List {}
|
||||
abstract class <warning descr="Class 'ReportMe' is empty">ReportMe</warning> implements java.util.List {}
|
||||
@@ -0,0 +1 @@
|
||||
<warning descr="Java file does not declare any class">// comment</warning>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>EmptyClass.java</file>
|
||||
<line>11</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Empty class</problem_class>
|
||||
<description>Class <code>ReportMe</code> is empty #loc</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>EmptyFile.java</file>
|
||||
<line>1</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Empty class</problem_class>
|
||||
<description>Java file does not declare any class #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+23
-7
@@ -1,13 +1,29 @@
|
||||
package com.siyeh.ig.classlayout;
|
||||
|
||||
import com.siyeh.ig.IGInspectionTestCase;
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.siyeh.ig.LightInspectionTestCase;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class EmptyClassInspectionTest extends IGInspectionTestCase {
|
||||
public class EmptyClassInspectionTest extends LightInspectionTestCase {
|
||||
|
||||
public void test() throws Exception {
|
||||
final EmptyClassInspection tool = new EmptyClassInspection();
|
||||
tool.ignoreClassWithParameterization = true;
|
||||
tool.ignoreThrowables = true;
|
||||
doTest("com/siyeh/igtest/classlayout/emptyclass", tool);
|
||||
public void testEmptyClass() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testPackageInfo() {
|
||||
doNamedTest("package-info");
|
||||
}
|
||||
|
||||
public void testEmptyFile() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspection() {
|
||||
final EmptyClassInspection inspection = new EmptyClassInspection();
|
||||
inspection.ignoreClassWithParameterization = true;
|
||||
inspection.ignoreThrowables = true;
|
||||
return inspection;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user