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:
+2
-2
@@ -25,7 +25,7 @@ public class A implements Serializable {
|
||||
return null;
|
||||
}
|
||||
native void f();
|
||||
void g() {
|
||||
void <warning descr="Method 'g()' may be 'static'">g</warning>() {
|
||||
System.out.println("boo!");
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ interface Surprise {
|
||||
}
|
||||
|
||||
interface FromJava8 {
|
||||
default void foo() {
|
||||
default void <warning descr="Method 'foo()' may be 'static'">foo</warning>() {
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
<problem>
|
||||
<file>A.java</file>
|
||||
<line>28</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Method may be 'static'</problem_class>
|
||||
<description>Method <code>g()</code> may be 'static' #loc</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>A.java</file>
|
||||
<line>42</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Method may be 'static'</problem_class>
|
||||
<description>Method <code>foo()</code> may be 'static' #loc</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
+15
-7
@@ -1,13 +1,21 @@
|
||||
package com.siyeh.ig.performance;
|
||||
|
||||
import com.siyeh.ig.IGInspectionTestCase;
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.siyeh.ig.LightInspectionTestCase;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class MethodMayBeStaticInspectionTest extends IGInspectionTestCase {
|
||||
public class MethodMayBeStaticInspectionTest extends LightInspectionTestCase {
|
||||
|
||||
public void test() throws Exception {
|
||||
final MethodMayBeStaticInspection tool = new MethodMayBeStaticInspection();
|
||||
tool.m_ignoreEmptyMethods = false;
|
||||
tool.m_ignoreDefaultMethods = false;
|
||||
doTest("com/siyeh/igtest/performance/method_may_be_static", tool);
|
||||
public void testA() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspection() {
|
||||
final MethodMayBeStaticInspection inspection = new MethodMayBeStaticInspection();
|
||||
inspection.m_ignoreEmptyMethods = false;
|
||||
inspection.m_ignoreDefaultMethods = false;
|
||||
return inspection;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user