From 4ed3b54b4217a200245b994d596cea692697f842 Mon Sep 17 00:00:00 2001 From: Sergej Zagursky Date: Thu, 3 Mar 2016 14:09:08 +0300 Subject: [PATCH] Files shouldn't be scanned if there are neither local inspections nor global simple inspections --- .../intellij/codeInspection/ex/GlobalInspectionContextImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java index 57aa4fb59cbf..2c7e801c96e5 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextImpl.java @@ -387,7 +387,7 @@ public class GlobalInspectionContextImpl extends GlobalInspectionContextBase imp ((RefManagerImpl)getRefManager()).initializeAnnotators(); runGlobalTools(scope, inspectionManager, globalTools, isOfflineInspections); - if (runGlobalToolsOnly) return; + if (runGlobalToolsOnly || (localTools.isEmpty() && globalSimpleTools.isEmpty())) return; final Set localScopeFiles = scope.toSearchScope() instanceof LocalSearchScope ? new THashSet() : null; for (Tools tools : globalSimpleTools) {