use of com.intellij.codeInspection.LocalInspectionTool in project intellij-community by JetBrains.
the class PythonInspectionsTest method testPyInitNewSignatureInspection.
public void testPyInitNewSignatureInspection() {
LocalInspectionTool inspection = new PyInitNewSignatureInspection();
doTest(getTestName(false), inspection);
}
use of com.intellij.codeInspection.LocalInspectionTool in project intellij-community by JetBrains.
the class PythonInspectionsTest method testPyRaisingNewStyleClassInspection.
public void testPyRaisingNewStyleClassInspection() {
LocalInspectionTool inspection = new PyRaisingNewStyleClassInspection();
doTestWithLanguageLevel(getTestName(false), inspection, LanguageLevel.PYTHON24);
}
use of com.intellij.codeInspection.LocalInspectionTool in project intellij-community by JetBrains.
the class PythonInspectionsTest method testPyTupleItemAssignmentInspection.
public void testPyTupleItemAssignmentInspection() {
LocalInspectionTool inspection = new PyTupleItemAssignmentInspection();
doTest(getTestName(false), inspection);
}
use of com.intellij.codeInspection.LocalInspectionTool in project intellij-community by JetBrains.
the class SpellCheckingEditorCustomization method init.
@SuppressWarnings({ "unchecked" })
private static boolean init() {
// It's assumed that default spell checking inspection settings are just fine for processing all types of data.
// Please perform corresponding settings tuning if that assumption is broken at future.
Class<LocalInspectionTool>[] inspectionClasses = (Class<LocalInspectionTool>[]) new Class<?>[] { SpellCheckingInspection.class };
for (Class<LocalInspectionTool> inspectionClass : inspectionClasses) {
try {
LocalInspectionTool tool = inspectionClass.newInstance();
SPELL_CHECK_TOOLS.put(tool.getShortName(), new LocalInspectionToolWrapper(tool));
} catch (Throwable e) {
return false;
}
}
return true;
}
use of com.intellij.codeInspection.LocalInspectionTool in project intellij-community by JetBrains.
the class HighlightStressTest method configureLocalInspectionTools.
@NotNull
@Override
protected LocalInspectionTool[] configureLocalInspectionTools() {
if ("RandomEditingForUnused".equals(getTestName(false))) {
return new LocalInspectionTool[] { new UnusedImportLocalInspection() };
}
List<InspectionToolWrapper> all = InspectionToolRegistrar.getInstance().createTools();
List<LocalInspectionTool> locals = new ArrayList<>();
for (InspectionToolWrapper tool : all) {
if (tool instanceof LocalInspectionToolWrapper) {
LocalInspectionTool e = ((LocalInspectionToolWrapper) tool).getTool();
locals.add(e);
}
}
return locals.toArray(new LocalInspectionTool[locals.size()]);
}
Aggregations