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:
+3
-3
@@ -29,7 +29,7 @@ public class SwitchStatementsWithoutDefault
|
||||
break;
|
||||
}
|
||||
|
||||
switch(bar)
|
||||
<warning descr="'switch' statement without 'default' branch">switch</warning>(bar)
|
||||
{
|
||||
case 3:
|
||||
case 4:
|
||||
@@ -52,13 +52,13 @@ public class SwitchStatementsWithoutDefault
|
||||
case baz:
|
||||
break;
|
||||
}
|
||||
switch(var)
|
||||
<warning descr="'switch' statement without 'default' branch">switch</warning>(var)
|
||||
{
|
||||
case bar:
|
||||
case baz:
|
||||
break;
|
||||
}
|
||||
switch (var)
|
||||
switch (var)<EOLError descr="'{' expected"></EOLError>
|
||||
}
|
||||
|
||||
enum MyEnum {
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems>
|
||||
|
||||
<problem>
|
||||
<file>SwitchStatementsWithoutDefault.java</file>
|
||||
<line>32</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">'switch' statement without 'default' branch</problem_class>
|
||||
<description><code>switch</code> statement without 'default' branch #loc</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>SwitchStatementsWithoutDefault.java</file>
|
||||
<line>55</line>
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">'switch' statement without 'default' branch</problem_class>
|
||||
<description><code>switch</code> statement without 'default' branch #loc</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
package com.siyeh.ig.controlflow;
|
||||
|
||||
import com.siyeh.ig.IGInspectionTestCase;
|
||||
|
||||
public class SwitchStatementWithoutDefaultInspectionTest extends IGInspectionTestCase {
|
||||
|
||||
public void test() {
|
||||
doTest("com/siyeh/igtest/controlflow/switch_statements_without_default",
|
||||
new SwitchStatementsWithoutDefaultInspection());
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.siyeh.ig.controlflow;
|
||||
|
||||
import com.intellij.codeInspection.InspectionProfileEntry;
|
||||
import com.siyeh.ig.LightInspectionTestCase;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class SwitchStatementsWithoutDefaultInspectionTest extends LightInspectionTestCase {
|
||||
|
||||
public void testSwitchStatementsWithoutDefault() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected InspectionProfileEntry getInspection() {
|
||||
return new SwitchStatementsWithoutDefaultInspection();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user