From 0d1406330c0cd0487c48e582a72a87a69ec875a2 Mon Sep 17 00:00:00 2001 From: Dima Golovinov Date: Thu, 19 Oct 2023 10:15:56 +0200 Subject: [PATCH] IJ-MR-115962 QD-4485 qodana scan: pr-mode doesn't honor source-directory Process review suggestions GitOrigin-RevId: 8191fcae33e71efbe18816f8005914df0a269f28 --- .../codeInspection/InspectionApplicationBase.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java b/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java index 646a1022f099..70439619f2a8 100644 --- a/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java +++ b/platform/inspect/src/com/intellij/codeInspection/InspectionApplicationBase.java @@ -104,7 +104,7 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR String myTargets; public boolean myErrorCodeRequired = true; - protected String myScopePattern; + String myScopePattern; public void startup() { if (myProjectPath == null) { @@ -276,11 +276,6 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR } protected @Nullable SearchScope getSearchScope(@NotNull Project project) throws ExecutionException, InterruptedException { - - if (myAnalyzeChanges) { - return getSearchScopeFromChangedFiles(project); - } - if (myScopePattern != null) { try { PackageSet packageSet = PackageSetFactory.getInstance().compile(myScopePattern); @@ -313,14 +308,6 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR return namedScope != null ? GlobalSearchScopesCore.filterScope(project, namedScope) : GlobalSearchScope.projectScope(project); } - public @NotNull SearchScope getSearchScopeFromChangedFiles(@NotNull Project project) throws ExecutionException, InterruptedException { - List files = getChangedFiles(project); - for (VirtualFile file : files) { - reportMessage(0, "modified file: " + file.getPath()); - } - return GlobalSearchScope.filesWithoutLibrariesScope(project, files); - } - private static void addRootChangesListener(Disposable parentDisposable, InspectionsReportConverter reportConverter) { MessageBusConnection applicationBus = ApplicationManager.getApplication().getMessageBus().connect(parentDisposable); applicationBus.subscribe(ProjectManager.TOPIC, new ProjectManagerListener() {