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 99bdc8a754ad..bdcf9faba876 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) {