mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 09:12:22 +07:00
zero tolerance cleanup
- make test class without tests abstract - private final methods - suppress UnresolvedPluginConfigReference for compound ref - remove redundant ; - replace with text block - always true/false GitOrigin-RevId: 7a4864227e4aae22671f48cc7a0c5c7114e09bae
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b027de1e29
commit
ed240eb3b2
@@ -218,7 +218,7 @@ public class InspectionApplicationBase implements CommandLineInspectionProgressR
|
||||
runAnalysisOnScope(projectPath, parentDisposable, project, myInspectionProfile, scope);
|
||||
}
|
||||
|
||||
private final @Nullable Project openProject(@NotNull Path projectPath, @NotNull Disposable parentDisposable)
|
||||
private @Nullable Project openProject(@NotNull Path projectPath, @NotNull Disposable parentDisposable)
|
||||
throws InterruptedException, ExecutionException {
|
||||
VirtualFile vfsProject = LocalFileSystem.getInstance().refreshAndFindFileByPath(
|
||||
FileUtil.toSystemIndependentName(projectPath.toString()));
|
||||
|
||||
@@ -82,7 +82,7 @@ public class Menu extends MenuItem {
|
||||
return "";
|
||||
|
||||
TextWithMnemonic txt = TextWithMnemonic.parse(src);
|
||||
return txt == null ? "" : txt.getText();
|
||||
return txt.getText();
|
||||
}
|
||||
|
||||
public static void renameAppMenuItems() {
|
||||
|
||||
@@ -43,11 +43,12 @@ public class ActionsTest extends IntegrationTestCase {
|
||||
a.finish();
|
||||
|
||||
List<Revision> rr = getRevisionsFor(f);
|
||||
assertEquals("current: doc2\n" +
|
||||
"action: doc1\n" +
|
||||
"null: file2\n" +
|
||||
"null: file1\n" +
|
||||
"External change: null", getNameAndOldContent(rr));
|
||||
assertEquals("""
|
||||
current: doc2
|
||||
action: doc1
|
||||
null: file2
|
||||
null: file1
|
||||
External change: null""", getNameAndOldContent(rr));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,11 +68,12 @@ public class ActionsTest extends IntegrationTestCase {
|
||||
}, "command", null);
|
||||
|
||||
List<Revision> rr = getRevisionsFor(f);
|
||||
assertEquals("current: doc2\n" +
|
||||
"command: doc1\n" +
|
||||
"null: initial\n" +
|
||||
"null: \n" +
|
||||
"External change: null", getNameAndOldContent(rr));
|
||||
assertEquals("""
|
||||
current: doc2
|
||||
command: doc1
|
||||
null: initial
|
||||
null:\s
|
||||
External change: null""", getNameAndOldContent(rr));
|
||||
}
|
||||
|
||||
public void testActionInsideCommandSurroundedWithSomeChanges() throws Exception {
|
||||
@@ -94,10 +96,11 @@ public class ActionsTest extends IntegrationTestCase {
|
||||
}, "command", null);
|
||||
|
||||
List<Revision> rr = getRevisionsFor(f);
|
||||
assertEquals("current: doc3\n" +
|
||||
"command: doc1\n" +
|
||||
"null: \n" +
|
||||
"External change: null", getNameAndOldContent(rr));
|
||||
assertEquals("""
|
||||
current: doc3
|
||||
command: doc1
|
||||
null:\s
|
||||
External change: null""", getNameAndOldContent(rr));
|
||||
}
|
||||
|
||||
private static @NotNull String getNameAndOldContent(@NotNull List<Revision> revisions) {
|
||||
|
||||
@@ -75,6 +75,7 @@ class SearchEverywhereMlExperiment {
|
||||
|
||||
fun isLoggingEnabledForTab(tabId: String) = tabsWithEnabledLogging.contains(tabId)
|
||||
|
||||
@Suppress("UnresolvedPluginConfigReference")
|
||||
private fun isDisableExperiments(tab: SearchEverywhereTabWithMlRanking): Boolean {
|
||||
return Registry.`is`("search.everywhere.force.disable.experiment.${tab.name.lowercase()}.ml")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user