use of com.intellij.codeInspection.varScopeCanBeNarrowed.FieldCanBeLocalInspection in project intellij-community by JetBrains.
the class FieldCanBeLocalTest method testIgnoreAnnotated.
public void testIgnoreAnnotated() throws Exception {
final FieldCanBeLocalInspection inspection = new FieldCanBeLocalInspection();
doTestConfigured(inspection);
}
use of com.intellij.codeInspection.varScopeCanBeNarrowed.FieldCanBeLocalInspection in project intellij-community by JetBrains.
the class ConvertFieldToLocalTest method configureLocalInspectionTools.
@NotNull
@Override
protected LocalInspectionTool[] configureLocalInspectionTools() {
final FieldCanBeLocalInspection inspection = new FieldCanBeLocalInspection();
inspection.IGNORE_FIELDS_USED_IN_MULTIPLE_METHODS = false;
return new LocalInspectionTool[] { inspection };
}
use of com.intellij.codeInspection.varScopeCanBeNarrowed.FieldCanBeLocalInspection in project intellij-community by JetBrains.
the class DaemonRespondToChangesTest method configureLocalInspectionTools.
@Override
protected LocalInspectionTool[] configureLocalInspectionTools() {
if (isStressTest() && !getTestName(false).equals("TypingCurliesClearsEndOfFileErrorsInPhp_ItIsPerformanceTestBecauseItRunsTooLong")) {
// all possible inspections
List<InspectionToolWrapper> all = InspectionToolRegistrar.getInstance().createTools();
List<LocalInspectionTool> locals = new ArrayList<>();
all.stream().filter(tool -> tool instanceof LocalInspectionToolWrapper).forEach(tool -> {
LocalInspectionTool e = ((LocalInspectionToolWrapper) tool).getTool();
locals.add(e);
});
return locals.toArray(new LocalInspectionTool[locals.size()]);
}
return new LocalInspectionTool[] { new FieldCanBeLocalInspection(), new RequiredAttributesInspectionBase(), new CheckDtdReferencesInspection(), new AccessStaticViaInstance() };
}
use of com.intellij.codeInspection.varScopeCanBeNarrowed.FieldCanBeLocalInspection in project intellij-community by JetBrains.
the class FieldCanBeLocalTest method testTwoMethodsNotIgnoreMultipleMethods.
public void testTwoMethodsNotIgnoreMultipleMethods() throws Exception {
final FieldCanBeLocalInspection inspection = new FieldCanBeLocalInspection();
inspection.IGNORE_FIELDS_USED_IN_MULTIPLE_METHODS = false;
doTestConfigured(inspection);
}
Aggregations