mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
global inspections: proceed with suspicious usages for unused declaration inspection (IDEA-151971)
This commit is contained in:
+3
-3
@@ -598,7 +598,7 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp
|
||||
LOG.assertTrue(!ApplicationManager.getApplication().isReadAccessAllowed() || isOfflineInspections, "Must not run under read action, too unresponsive");
|
||||
final List<InspectionToolWrapper> needRepeatSearchRequest = new ArrayList<InspectionToolWrapper>();
|
||||
|
||||
final boolean canBeExternalUsages = scope.getScopeType() != AnalysisScope.PROJECT;
|
||||
final boolean canBeExternalUsages = !(scope.getScopeType() == AnalysisScope.PROJECT && scope.isIncludeTestSource());
|
||||
for (Tools tools : globalTools) {
|
||||
for (ScopeToolState state : tools.getTools()) {
|
||||
final InspectionToolWrapper toolWrapper = state.getTool();
|
||||
@@ -618,8 +618,8 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp
|
||||
@Override
|
||||
public void run() {
|
||||
tool.runInspection(scope, inspectionManager, GlobalInspectionContextImpl.this, toolPresentation);
|
||||
//skip phase when we are sure that scope already contains everything
|
||||
if (canBeExternalUsages &&
|
||||
//skip phase when we are sure that scope already contains everything, unused declaration though needs to proceed with its suspicious code
|
||||
if ((canBeExternalUsages || tool.getAdditionalJobs() != null) &&
|
||||
tool.queryExternalUsagesRequests(inspectionManager, GlobalInspectionContextImpl.this, toolPresentation)) {
|
||||
needRepeatSearchRequest.add(toolWrapper);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user