mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
IJ-MR-115962 QD-4485 qodana scan: pr-mode doesn't honor source-directory
Process review suggestions GitOrigin-RevId: 8191fcae33e71efbe18816f8005914df0a269f28
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2a234db751
commit
0d1406330c
@@ -104,7 +104,7 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR
|
|||||||
|
|
||||||
String myTargets;
|
String myTargets;
|
||||||
public boolean myErrorCodeRequired = true;
|
public boolean myErrorCodeRequired = true;
|
||||||
protected String myScopePattern;
|
String myScopePattern;
|
||||||
|
|
||||||
public void startup() {
|
public void startup() {
|
||||||
if (myProjectPath == null) {
|
if (myProjectPath == null) {
|
||||||
@@ -276,11 +276,6 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected @Nullable SearchScope getSearchScope(@NotNull Project project) throws ExecutionException, InterruptedException {
|
protected @Nullable SearchScope getSearchScope(@NotNull Project project) throws ExecutionException, InterruptedException {
|
||||||
|
|
||||||
if (myAnalyzeChanges) {
|
|
||||||
return getSearchScopeFromChangedFiles(project);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (myScopePattern != null) {
|
if (myScopePattern != null) {
|
||||||
try {
|
try {
|
||||||
PackageSet packageSet = PackageSetFactory.getInstance().compile(myScopePattern);
|
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);
|
return namedScope != null ? GlobalSearchScopesCore.filterScope(project, namedScope) : GlobalSearchScope.projectScope(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull SearchScope getSearchScopeFromChangedFiles(@NotNull Project project) throws ExecutionException, InterruptedException {
|
|
||||||
List<VirtualFile> 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) {
|
private static void addRootChangesListener(Disposable parentDisposable, InspectionsReportConverter reportConverter) {
|
||||||
MessageBusConnection applicationBus = ApplicationManager.getApplication().getMessageBus().connect(parentDisposable);
|
MessageBusConnection applicationBus = ApplicationManager.getApplication().getMessageBus().connect(parentDisposable);
|
||||||
applicationBus.subscribe(ProjectManager.TOPIC, new ProjectManagerListener() {
|
applicationBus.subscribe(ProjectManager.TOPIC, new ProjectManagerListener() {
|
||||||
|
|||||||
Reference in New Issue
Block a user