From e64e820d4d5532fb05ee75462132e49d5c924fc2 Mon Sep 17 00:00:00 2001 From: Nicolas QUINQUENEL Date: Fri, 8 Nov 2024 09:23:07 +0100 Subject: [PATCH] SLI-1674 Update labels to match the rebranding (#1220) --- README.md | 21 +++-- docs/contributing.md | 5 +- its/build.gradle.kts | 5 +- its/src/main/resources/META-INF/plugin.xml | 2 +- .../org/sonarlint/intellij/its/BaseUiTest.kt | 6 +- .../intellij/its/fixtures/IdeaFrame.kt | 2 +- .../its/tests/ConnectedAnalysisTests.kt | 2 +- .../its/tests/domain/CurrentFileTabTests.kt | 20 ++--- .../its/tests/domain/OpenInIdeTests.kt | 6 +- .../its/tests/domain/ReportTabTests.kt | 2 +- .../tests/domain/SecurityHotspotTabTests.kt | 16 ++-- .../tests/domain/SharedConfigurationTests.kt | 2 +- .../tests/domain/TaintVulnerabilityTests.kt | 6 +- .../intellij/its/tests/flavor/PLSLQTest.kt | 2 +- .../intellij/its/utils/ExclusionUtils.kt | 6 +- .../intellij/its/utils/FiltersUtils.kt | 4 +- .../intellij/its/utils/ProjectBindingUtils.kt | 10 +-- .../intellij/its/utils/SettingsUtils.kt | 4 +- .../intellij/SonarLintIntelliJClient.kt | 24 +++--- .../intellij/actions/DisableRuleAction.java | 2 +- .../intellij/actions/MarkAsResolvedAction.kt | 10 +-- .../actions/OpenIssueInBrowserAction.kt | 2 +- .../intellij/actions/ReopenIssueAction.kt | 10 +-- .../intellij/actions/RestartBackendAction.kt | 4 +- .../RestartBackendNotificationAction.kt | 2 +- .../actions/ReviewSecurityHotspotAction.kt | 8 +- .../actions/SonarAnalyzeAllFilesAction.java | 4 +- .../actions/ToolWindowLogAnalysisAction.java | 2 +- .../actions/ToolWindowVerboseModeAction.java | 2 +- .../sonarlint/intellij/analysis/Analysis.java | 10 +-- .../intellij/analysis/AnalysisScope.java | 2 +- .../intellij/analysis/AnalysisSubmitter.java | 2 +- .../analysis/LocalFileExclusions.java | 4 +- .../intellij/callable/ShowFindingCallable.kt | 10 ++- .../config/SonarLintColorSettingsPage.java | 2 +- .../AutomaticServerConnectionCreator.kt | 14 ++-- .../config/global/GlobalExclusionsPanel.java | 2 +- .../config/global/ServerConnection.java | 2 +- .../global/ServerConnectionMgmtPanel.java | 20 ++--- .../config/global/SonarLintAboutPanel.java | 6 +- .../global/SonarLintGlobalConfigurable.java | 8 +- .../global/SonarLintGlobalOptionsPanel.java | 7 +- ...onarLintGlobalSettingsPresentableName.java | 2 +- .../global/rules/RuleConfigurationPanel.java | 8 +- .../global/wizard/NotificationsStep.java | 2 +- .../config/global/wizard/ServerStep.form | 2 +- .../config/global/wizard/ServerStep.java | 4 +- .../project/AddEditExclusionDialog.java | 8 +- .../project/ProjectExclusionsPanel.java | 2 +- .../config/project/SearchProjectKeyDialog.kt | 2 +- .../project/SonarLintProjectBindPanel.java | 6 +- .../SonarLintProjectPropertiesPanel.java | 2 +- .../SonarLintProjectSettingsPanel.java | 2 +- .../sonarlint/intellij/core/BackendService.kt | 24 +++--- .../editor/ApplyQuickFixIntentionAction.kt | 4 +- .../editor/DisableRuleIntentionAction.java | 4 +- .../intellij/editor/EditorDecorator.kt | 2 +- .../editor/ShowLocationsIntentionAction.java | 4 +- .../ShowRuleDescriptionIntentionAction.java | 4 +- ...abilityRuleDescriptionIntentionAction.java | 4 +- .../errorsubmitter/BlameSonarSource.java | 6 +- .../java/JavaAnalysisConfigurator.java | 2 +- .../intellij/messages/AnalysisListener.java | 2 +- .../intellij/messages/StatusListener.java | 2 +- .../AnalysisRequirementNotifications.java | 8 +- .../ClearSecurityHotspotsFiltersAction.kt | 2 +- .../OpenGlobalSettingsAction.java | 2 +- .../OpenProjectSettingsAction.java | 2 +- .../SonarLintProjectNotifications.kt | 47 ++++++----- .../sharing/AutomaticSharedConfigCreator.kt | 18 ++--- .../intellij/sharing/ConfigurationSharing.kt | 2 +- .../sharing/SonarLintSharedFolderUtils.kt | 2 +- .../intellij/tasks/ConnectionTestTask.kt | 2 +- .../intellij/tasks/FutureAwaitingTask.kt | 6 +- .../intellij/tasks/GetOrganizationTask.java | 2 +- .../intellij/tasks/GetOrganizationsTask.java | 2 +- .../trigger/SonarLintCheckinHandler.java | 16 ++-- .../intellij/ui/AbstractIssuesPanel.java | 6 +- .../intellij/ui/AutoTriggerStatusPanel.java | 2 +- .../ui/CurrentFileConnectedModePanel.java | 4 +- .../intellij/ui/CurrentFilePanel.java | 6 +- .../intellij/ui/CurrentFileStatusPanel.java | 2 +- .../sonarlint/intellij/ui/ReportPanel.java | 4 +- .../intellij/ui/SecurityHotspotsPanel.java | 4 +- .../intellij/ui/SonarLintLogPanel.java | 5 +- .../ui/SonarLintToolWindowFactory.java | 2 +- .../ui/inlay/FixSuggestionInlayPanel.kt | 2 +- .../traffic/light/SonarLintDashboardPanel.kt | 2 +- .../TaintVulnerabilitiesPanel.kt | 32 ++++++-- .../sonarlint/intellij/util/HelpLabelUtils.kt | 11 +-- .../sonarlint/intellij/util/ProgressUtils.kt | 6 +- .../intellij/util/SonarLintActions.java | 10 +-- src/main/resources/META-INF/plugin.xml | 79 ++++++++++--------- .../intellij/SonarLintIntelliJClientTests.kt | 10 +-- .../analysis/LocalFileExclusionsTests.java | 4 +- .../SonarLintColorSettingsPageTests.java | 2 +- .../DisableRuleIntentionActionTests.java | 4 +- .../errorsubmitter/BlameSonarSourceTests.java | 8 +- .../mediumtests/StandaloneModeMediumTests.kt | 6 +- ...AnalysisRequirementNotificationsTests.java | 7 +- .../trigger/SonarLintCheckinHandlerTests.java | 9 ++- 101 files changed, 384 insertions(+), 332 deletions(-) diff --git a/README.md b/README.md index beb717cc8b..189ccda52a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -SonarLint IntelliJ Plugin +SonarQube for IntelliJ Plugin ========================= [![Build Status](https://api.cirrus-ci.com/github/SonarSource/sonarlint-intellij.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/sonarlint-intellij) [![Quality Gate](https://next.sonarqube.com/sonarqube/api/project_badges/measure?project=org.sonarsource.sonarlint.intellij%3Asonarlint-intellij&metric=alert_status)](https://next.sonarqube.com/sonarqube/dashboard?id=org.sonarsource.sonarlint.intellij%3Asonarlint-intellij) -SonarLint is an IDE extension that supports you in writing [Clean Code](https://www.sonarsource.com/solutions/clean-code/), by detecting and helping you fix quality issues as you type. See documentation details for [Clean Code](https://docs.sonarsource.com/sonarlint/intellij/concepts/clean-code/). -Like a spell checker, SonarLint squiggles flaws so they can be fixed before committing code. +SonarQube for IntelliJ is an IDE extension that supports you in writing [Clean Code](https://www.sonarsource.com/solutions/clean-code/), by +detecting and helping you fix quality issues as you type. See documentation details +for [Clean Code](https://docs.sonarsource.com/sonarlint/intellij/concepts/clean-code/). +Like a spell checker, SonarQube for IntelliJ squiggles flaws so they can be fixed before committing code. Useful links ------------ @@ -18,14 +20,18 @@ Useful links How to install -------------- -You can install SonarLint from the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/7973-sonarlint), directly available in the IDE preferences. +You can install SonarQube for IntelliJ from the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/7973-sonarlint), directly +available in the IDE preferences. Full up-to-date details are available on the [Requirements](https://docs.sonarsource.com/sonarlint/intellij/getting-started/requirements/) and [Installation](https://docs.sonarsource.com/sonarlint/intellij/getting-started/installation/) pages. Questions and Feedback? -------------------------- -For SonarLint support questions ("How do I?", "I got this error, why?", ...), please first read the [FAQ](https://community.sonarsource.com/t/frequently-asked-questions/7204) to learn how to get your logs, and then head to the [SonarSource forum](https://community.sonarsource.com/c/help/sl). Before creating a new topic, please check if your question has already been answered because there is a chance that someone has already had the same issue. +For SonarQube for IntelliJ support questions ("How do I?", "I got this error, why?", ...), please first read +the [FAQ](https://community.sonarsource.com/t/frequently-asked-questions/7204) to learn how to get your logs, and then head to +the [Sonar forum](https://community.sonarsource.com/c/help/sl). Before creating a new topic, please check if your question has already been +answered because there is a chance that someone has already had the same issue. Be aware that this forum is a community, and the standard pleasantries are expected (_Hello, Thank you, I appreciate the reply, etc._). If you don't get an answer to your thread, you should sit on your hands for at least three days before bumping it. Operators are not standing by, but the Teams and Community Managers know that your questions are important. :-) @@ -61,7 +67,7 @@ How to run UI tests ./gradlew :its:runIdeForUiTests & -The above will start an IDE instance with the SonarLint plugin. Wait for the UI robot server to start, then run the ITs: +The above will start an IDE instance with the SonarQube for IntelliJ plugin. Wait for the UI robot server to start, then run the ITs: ./gradlew :its:check @@ -85,7 +91,8 @@ How to debug UI tests If you want to debug what happens on the test side, you can simply launch the test in debug mode from the IDE. -If you want to debug what happens in the SonarLint plugin, you can open the project in IntelliJ, and run the `its:runIdeForUiTests` task in debug mode (for example from the Gradle panel on the right). +If you want to debug what happens in the SonarQube for IntelliJ plugin, you can open the project in IntelliJ, and run the +`its:runIdeForUiTests` task in debug mode (for example from the Gradle panel on the right). How to debug SLOOP diff --git a/docs/contributing.md b/docs/contributing.md index 5de9588064..cbd579b13e 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -3,10 +3,11 @@ Contributing If you would like to see a new feature, please create a new thread in the forum ["Suggest new features"](https://community.sonarsource.com/c/suggestions/features). -Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes. +Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside +Sonar to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes. With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make. Make sure that you follow our [code style](https://github.com/SonarSource/sonar-developer-toolset#code-style) and all tests are passing. -Thank You! The SonarSource Team +Thank You! The Sonar Team diff --git a/its/build.gradle.kts b/its/build.gradle.kts index a6da18305c..522b1b0f2b 100644 --- a/its/build.gradle.kts +++ b/its/build.gradle.kts @@ -39,8 +39,8 @@ tasks.test { useJUnitPlatform { val tag = System.getenv("TEST_SUITE") - if (tag != null && (tag.equals("OpenInIdeTests") || tag.equals("ConnectedAnalysisTests") - || tag.equals("ConfigurationTests") || tag.equals("Standalone")) + if (tag != null && (tag == "OpenInIdeTests" || tag == "ConnectedAnalysisTests" + || tag == "ConfigurationTests" || tag == "Standalone") ) { includeTags(tag) } @@ -58,7 +58,6 @@ tasks.downloadRobotServerPlugin { } val ijVersion: String by project -val intellijBuildVersion: String by project intellij { if (project.hasProperty("ijVersion")) { diff --git a/its/src/main/resources/META-INF/plugin.xml b/its/src/main/resources/META-INF/plugin.xml index 080c1f861f..65af10aeda 100644 --- a/its/src/main/resources/META-INF/plugin.xml +++ b/its/src/main/resources/META-INF/plugin.xml @@ -24,7 +24,7 @@ SonarLint-ITs 1.0 SonarSource - Fake Plugin To Run SonarLint UI tests with multiple flavors + Fake Plugin To Run SonarQube for IntelliJ UI tests with multiple flavors diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt index d9da3a927c..146d0f8408 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt @@ -111,9 +111,9 @@ open class BaseUiTest { closeAllDialogs() optionalStep { sonarlintLogPanel { - println("SonarLint log outputs:") + println("SonarQube for IntelliJ log outputs:") println(console().text) - toolBarButton("Clear SonarLint Console").click() + toolBarButton("Clear SonarQube for IntelliJ Console").click() } } if (remoteRobot.isCLion()) { @@ -157,7 +157,7 @@ open class BaseUiTest { private fun sonarlintLogPanel(function: TabContentFixture.() -> Unit = {}) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Log") { select() } content("SonarLintLogPanel") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt index d1c0b1bf75..54437cb473 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/fixtures/IdeaFrame.kt @@ -109,7 +109,7 @@ class IdeaFrame(remoteRobot: RemoteRobot, remoteComponent: RemoteComponent) : Co fun IdeaFrame.analyzeFile() { editorComponent().rightClick() - actionMenuItem("Analyze with SonarLint") { + actionMenuItem("Analyze with SonarQube for IntelliJ") { click() } } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt index 7a9ccd408f..424c11298c 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/ConnectedAnalysisTests.kt @@ -203,7 +203,7 @@ class ConnectedAnalysisTests : BaseUiTest() { "Change this code to not construct SQL queries directly from user-controlled data." ) enableConnectedModeFromTaintPanel(TAINT_VULNERABILITY_PROJECT_KEY, false, "Orchestrator") - verifyTaintTabContainsMessages("The project is not bound to SonarCloud/SonarQube") + verifyTaintTabContainsMessages("The project is not bound to SonarQube (Server, Cloud)") } @Test diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt index 849050e252..aad27143eb 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/CurrentFileTabTests.kt @@ -38,7 +38,7 @@ class CurrentFileTabTests { fun verifyCurrentFileShowsCard(expectedClass: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() assertThat(findCard(expectedClass)).isNotNull } @@ -47,11 +47,11 @@ class CurrentFileTabTests { } fun changeStatusOnSonarQubeAndPressChange(status: String) { - changeStatusAndPressChange("Mark Issue as Resolved on SonarQube", status) + changeStatusAndPressChange("Mark Issue as Resolved on SonarQube Server", status) } fun changeStatusOnSonarCloudAndPressChange(status: String) { - changeStatusAndPressChange("Mark Issue as Resolved on SonarCloud", status) + changeStatusAndPressChange("Mark Issue as Resolved on SonarQube Cloud", status) } private fun changeStatusAndPressChange(windowTitle: String, status: String) { @@ -82,7 +82,7 @@ class CurrentFileTabTests { with(remoteRobot) { idea { notification("The issue was successfully marked as resolved") - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { content("CurrentFilePanel") { hasText("No issues found in the current opened file") } @@ -94,7 +94,7 @@ class CurrentFileTabTests { fun openIssueReviewDialogFromList(issueMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() closeAllGotItTooltips() tabTitleContains("Current File") { select() } @@ -110,7 +110,7 @@ class CurrentFileTabTests { fun verifyCurrentFileTabContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { @@ -129,7 +129,7 @@ class CurrentFileTabTests { fun clickCurrentFileIssue(issueMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } closeAllGotItTooltips() @@ -143,11 +143,11 @@ class CurrentFileTabTests { fun enableConnectedModeFromCurrentFilePanel(projectKey: String?, enabled: Boolean, connectionName: String) { optionalIdeaFrame()?.apply { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } } if (enabled) { @@ -161,7 +161,7 @@ class CurrentFileTabTests { fun verifyCurrentFileRuleDescriptionTabContains(expectedMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() content("CurrentFilePanel") { waitFor(Duration.ofMinutes(1), errorMessage = "Unable to find '$expectedMessage' in: ${findAllText()}") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt index cf27f84513..83fafcf71b 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/OpenInIdeTests.kt @@ -65,7 +65,7 @@ class OpenInIdeTests { idea { dialog("Trust This SonarQube Server?") { jbTextFields()[1].text = "Orchestrator" - buttonContainsText("Connect to This SonarQube").click() + buttonContainsText("Connect to This SonarQube Server").click() } } } @@ -74,9 +74,9 @@ class OpenInIdeTests { fun acceptNewSCAutomatedConnection() { with(remoteRobot) { idea { - dialog("Trust This SonarCloud Organization?") { + dialog("Trust This SonarQube Cloud Organization?") { jbTextFields()[1].text = "sonarlint-it" - buttonContainsText("Connect to This SonarCloud Organization").click() + buttonContainsText("Connect to This SonarQube Cloud Organization").click() } } } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt index d7d129c372..3951bf75a9 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/ReportTabTests.kt @@ -31,7 +31,7 @@ class ReportTabTests { with(remoteRobot) { idea { analyzeFile() - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() content("ReportPanel") { expectedMessages.forEach { assertThat(hasText(it)).isTrue() } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt index 7609a10f8a..3340ea92b9 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SecurityHotspotTabTests.kt @@ -36,7 +36,7 @@ class SecurityHotspotTabTests { fun openSecurityHotspotReviewDialogFromList(securityHotspotMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotTree") { @@ -53,7 +53,7 @@ class SecurityHotspotTabTests { fun changeSecurityHotspotStatusAndPressChange(status: String) { with(remoteRobot) { idea { - dialog("Change Security Hotspot Status on SonarQube") { + dialog("Change Security Hotspot Status on SonarQube Server") { content(status) { click() } @@ -67,7 +67,7 @@ class SecurityHotspotTabTests { with(remoteRobot) { idea { notification("The Security Hotspot status was successfully updated") - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { content("SecurityHotspotsPanel") { hasText("No Security Hotspots shown due to the current filtering") } @@ -79,7 +79,7 @@ class SecurityHotspotTabTests { fun verifySecurityHotspotTabContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotsPanel") { @@ -93,7 +93,7 @@ class SecurityHotspotTabTests { fun verifySecurityHotspotTreeContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotTree") { @@ -107,11 +107,11 @@ class SecurityHotspotTabTests { fun enableConnectedModeFromSecurityHotspotPanel(projectKey: String, enabled: Boolean, connectionName: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Security Hotspots") { select() } content("SecurityHotspotsPanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } } if (enabled) { @@ -126,7 +126,7 @@ class SecurityHotspotTabTests { fun verifySecurityHotspotRuleDescriptionTabContains(expectedMessage: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() content("SecurityHotspotsPanel") { waitFor(Duration.ofMinutes(1), errorMessage = "Unable to find '$expectedMessage' in: ${findAllText()}") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt index e1b456015e..a57e6afcb7 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/SharedConfigurationTests.kt @@ -47,7 +47,7 @@ class SharedConfigurationTests { notificationByActionName("Use configuration").click() dialog("Connect to This SonarQube Server?") { jBPasswordField().text = token - buttonContainsText("Connect to This SonarQube").click() + buttonContainsText("Connect to This SonarQube Server").click() } } } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt index 1c375bc929..f40d0ad055 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/domain/TaintVulnerabilityTests.kt @@ -32,7 +32,7 @@ class TaintVulnerabilityTests { fun verifyTaintTabContainsMessages(vararg expectedMessages: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Taint Vulnerabilities") { select() } content("TaintVulnerabilitiesPanel") { @@ -48,11 +48,11 @@ class TaintVulnerabilityTests { fun enableConnectedModeFromTaintPanel(projectKey: String, enabled: Boolean, connectionName: String) { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Taint Vulnerabilities") { select() } content("TaintVulnerabilitiesPanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } } if (enabled) { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt index ed0036f178..bd85063b93 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/tests/flavor/PLSLQTest.kt @@ -64,7 +64,7 @@ class PLSQLTest : BaseUiTest() { private fun verifyIssueTreeContainsMessages() { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } // the synchronization can take a while to happen diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt index ba384b613a..af820a5cc2 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ExclusionUtils.kt @@ -47,11 +47,11 @@ class ExclusionUtils { private fun openExclusionsTab() { with(remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { - toolBarButton("Configure SonarLint").click() + toolBarButton("Configure SonarQube for IntelliJ").click() } selectExclusionTab() } @@ -88,7 +88,7 @@ class ExclusionUtils { dialog("Project Settings") { findText("File Exclusions").click() actionButtons(ActionButtonFixture.byType())[0].clickWhenEnabled() - dialog("Add SonarLint File Exclusion") { + dialog("Add SonarQube for IntelliJ File Exclusion") { jbTextFieldsWithBrowseButton()[0].click() keyboard { enterText(fileName) } waitFor(Duration.ofSeconds(1)) { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt index 71dd84801c..2039978900 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/FiltersUtils.kt @@ -38,7 +38,7 @@ class FiltersUtils { fun setFocusOnNewCode(focusOnNewCode: Boolean) { optionalIdeaFrame()?.apply { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { @@ -56,7 +56,7 @@ class FiltersUtils { fun showResolvedIssues() { with(BaseUiTest.remoteRobot) { idea { - toolWindow("SonarLint") { + toolWindow("SonarQube for IntelliJ") { ensureOpen() tabTitleContains("Current File") { select() } content("CurrentFilePanel") { diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt index 2070cd1df1..3b5964d452 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/ProjectBindingUtils.kt @@ -42,7 +42,7 @@ class ProjectBindingUtils { with(remoteRobot) { idea { dialog("Project Settings") { - checkBox("Bind project to SonarCloud / SonarQube").unselect() + checkBox("Bind project to SonarQube (Server, Cloud)").unselect() if (isRider()) { button("Save").click() } else { @@ -57,7 +57,7 @@ class ProjectBindingUtils { with(remoteRobot) { idea { dialog("Project Settings") { - checkBox("Bind project to SonarCloud / SonarQube").select() + checkBox("Bind project to SonarQube (Server, Cloud)").select() comboBox("Connection:").click() remoteRobot.find(byXpath("//div[@class='CustomComboPopup']")).apply { waitFor(Duration.ofSeconds(5)) { hasText(connectionName) } @@ -75,9 +75,9 @@ class ProjectBindingUtils { fun bindProjectAndModuleInFileSettings() { sonarLintGlobalSettings { tree { - clickPath("Tools", "SonarLint", "Project Settings") + clickPath("Tools", "SonarQube for IntelliJ", "Project Settings") } - checkBox("Bind project to SonarCloud / SonarQube").select() + checkBox("Bind project to SonarQube (Server, Cloud)").select() pressOk() errorMessage("Connection should not be empty") @@ -100,7 +100,7 @@ class ProjectBindingUtils { pressOk() errorMessage("Project key for module 'sample-scala-module' should not be empty") buttons(JButtonFixture.byText("Search in list\u2026"))[1].click() - dialog("Select SonarQube Project To Bind") { + dialog("Select SonarQube Server Project To Bind") { jList { clickItem(MODULE_PROJECT_KEY, false) } diff --git a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt index cce467c1b1..4ffc8b8439 100644 --- a/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt +++ b/its/src/test/kotlin/org/sonarlint/intellij/its/utils/SettingsUtils.kt @@ -47,14 +47,14 @@ class SettingsUtils { Pause.pause(3000) // Search for SonarLint because sometimes it is off the screen - search("SonarLint") + search("SonarQube for IntelliJ") tree { waitUntilLoaded() // little trick to check if the search has been applied waitFor(Duration.ofSeconds(10), Duration.ofSeconds(1)) { collectRows().size in 1..10 } Pause.pause(1000) - clickPath("Tools", "SonarLint") + clickPath("Tools", "SonarQube for IntelliJ") } // let the SonarLint view settle (sometimes the UI thread blocks for a few seconds) diff --git a/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt b/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt index 04e48cad3f..f88a06d9b0 100644 --- a/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt +++ b/src/main/java/org/sonarlint/intellij/SonarLintIntelliJClient.kt @@ -193,10 +193,12 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { private fun getAutoShareConfigParams(uniqueSuggestion: ConnectionSuggestionDto): Triple { return if (uniqueSuggestion.connectionSuggestion.isRight) { - Triple("SonarCloud organization", uniqueSuggestion.connectionSuggestion.right.projectKey, + Triple( + "SonarQube Cloud organization", uniqueSuggestion.connectionSuggestion.right.projectKey, uniqueSuggestion.connectionSuggestion.right.organization) } else { - Triple("SonarQube server", uniqueSuggestion.connectionSuggestion.left.projectKey, + Triple( + "SonarQube Server", uniqueSuggestion.connectionSuggestion.left.projectKey, uniqueSuggestion.connectionSuggestion.left.serverUrl) } } @@ -415,13 +417,13 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { if (isSQ) { setUpManualConnection(serverOrOrg) } else { - throw CancellationException("SonarLint cannot assist with manual connection to SonarCloud organization") + throw CancellationException("SonarQube for IntelliJ cannot assist with manual connection to SonarQube Cloud organization") } } projectLessNotification( "", - "You have successfully established a connection to the ${if (isSQ) "SonarQube server" else "SonarCloud organization"}", + "You have successfully established a connection to the ${if (isSQ) "SonarQube Server" else "SonarQube Cloud organization"}", NotificationType.INFORMATION ) @@ -440,7 +442,7 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { private fun setUpManualConnection(serverUrl: String): AssistCreatingConnectionResponse { val warningTitle = "Trust This SonarQube Server?" val message = """ - The server ${StringEscapeUtils.escapeHtml4(serverUrl)} is attempting to set up a connection with SonarLint. Letting SonarLint connect to an untrusted SonarQube server is potentially dangerous. + The server ${StringEscapeUtils.escapeHtml4(serverUrl)} is attempting to set up a connection with SonarQube for IntelliJ. Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server is potentially dangerous. If you don’t trust this server, we recommend canceling this action and manually setting up Connected Mode. """.trimIndent() @@ -480,8 +482,8 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { getService(project, ProjectBindingManager::class.java).bindTo(connection, projectKey, emptyMap(), mode) get(project).simpleNotification( "Project successfully bound", - "Local project bound to project '$projectKey' of SonarQube server '${connection.name}'. " - + "You can now enjoy all capabilities of SonarLint Connected Mode. The binding of this project can be updated in the SonarLint Settings.", + "Local project bound to project '$projectKey' of SonarQube Server '${connection.name}'. " + + "You can now enjoy all capabilities of SonarQube for IntelliJ Connected Mode. The binding of this project can be updated in the SonarQube for IntelliJ Settings.", NotificationType.INFORMATION, OpenInBrowserAction("Learn More in Documentation", null, CONNECTED_MODE_BENEFITS_LINK) ) @@ -577,10 +579,10 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { } override fun noBindingSuggestionFound(params: NoBindingSuggestionFoundParams) { - val serverType = if (params.isSonarCloud) "SonarCloud" else "SonarQube" + val serverType = if (params.isSonarCloud) "SonarQube Cloud" else "SonarQube Server" projectLessNotification( "No matching open project found", - "IntelliJ cannot match $serverType project '${params.projectKey}' to any of the currently open projects. Please open your project and try again.", + "SonarQube for IntelliJ cannot match $serverType project '${params.projectKey}' to any of the currently open projects. Please open your project and try again.", NotificationType.WARNING, OpenInBrowserAction("Open Troubleshooting Documentation", null, TROUBLESHOOTING_CONNECTED_MODE_SETUP_LINK) ) @@ -655,7 +657,7 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { getService( module.project, SonarLintConsole::class.java - ).debug("Several candidate Vcs repositories detected for module $module, choosing first") + ).debug("Several candidate VCS repositories detected for module $module, choosing first") } return repositories } @@ -671,7 +673,7 @@ object SonarLintIntelliJClient : SonarLintRpcClientDelegate { getService( project, SonarLintConsole::class.java - ).debug("Several candidate Vcs repositories detected for project $project, choosing first") + ).debug("Several candidate VCS repositories detected for project $project, choosing first") } return repositories } diff --git a/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java b/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java index 1ef9b2a813..600c73c290 100644 --- a/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/DisableRuleAction.java @@ -36,7 +36,7 @@ public class DisableRuleAction extends AbstractSonarAction { public DisableRuleAction() { - super("Disable Rule", "Disable the SonarLint rule that activated this rule", AllIcons.Actions.Cancel); + super("Disable Rule", "Disable the SonarQube for IntelliJ rule that activated this rule", AllIcons.Actions.Cancel); } @Override diff --git a/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt b/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt index 0752dcd7b3..6f664e8be7 100644 --- a/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/MarkAsResolvedAction.kt @@ -63,8 +63,8 @@ class MarkAsResolvedAction( ), IntentionAction, PriorityAction, Iconable { companion object { - const val REVIEW_ISSUE_GROUP = "SonarLint: Mark Issue as Resolved" - private const val ERROR_TITLE = "SonarLint - Unable to mark the issue as resolved" + const val REVIEW_ISSUE_GROUP = "SonarQube for IntelliJ: Mark Issue as Resolved" + private const val ERROR_TITLE = "SonarQube for IntelliJ - Unable to mark the issue as resolved" private const val CONTENT = "The issue was successfully marked as resolved" fun canBeMarkedAsResolved(project: Project, issue: Issue): Boolean { @@ -194,7 +194,7 @@ class MarkAsResolvedAction( private fun confirm(project: Project, productName: String, issueStatus: IssueResolutionStatus): Boolean { return shouldSkipConfirmationDialog() || MessageDialogBuilder.okCancel( "Confirm marking issue as resolved", - "Are you sure you want to mark this issue as \"${issueStatus.title}\"? The status will be updated on $productName and synchronized with any contributor using SonarLint in connected mode" + "Are you sure you want to mark this issue as \"${issueStatus.title}\"? The status will be updated on $productName and synchronized with any contributor using SonarQube for IntelliJ in Connected Mode" ).yesText("Confirm").noText("Cancel").doNotAsk(DoNotShowAgain()).ask(project) } @@ -250,10 +250,10 @@ class MarkAsResolvedAction( override fun startInWriteAction() = false - override fun getText() = "SonarLint: Mark issue as\u2026" + override fun getText() = "SonarQube for IntelliJ: Mark issue as\u2026" override fun getFamilyName(): String { - return "SonarLint mark issue as\u2026" + return "SonarQube for IntelliJ mark issue as\u2026" } override fun isVisible(e: AnActionEvent): Boolean { diff --git a/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt b/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt index fdc25d4221..f88c448d27 100644 --- a/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/OpenIssueInBrowserAction.kt @@ -34,7 +34,7 @@ import org.sonarlint.intellij.util.SonarLintAppUtils.findModuleForFile class OpenIssueInBrowserAction : AbstractSonarAction( "Open In Browser", - "Open issue in browser interface of SonarCloud or SonarQube", + "Open issue in browser interface of SonarQube (Server, Cloud)", null ) { diff --git a/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt b/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt index 5d20f4a6d4..fc928dea2d 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/ReopenIssueAction.kt @@ -53,7 +53,7 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct PriorityAction, Iconable { companion object { - private const val ERROR_TITLE = "SonarLint - Unable to reopen the issue" + private const val ERROR_TITLE = "SonarQube for IntelliJ - Unable to reopen the issue" private const val CONTENT = "The issue was successfully reopened" fun canBeReopened(project: Project, issue: Issue): Boolean { @@ -114,7 +114,7 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct private fun confirm(project: Project, productName: String): Boolean { return shouldSkipConfirmationDialogForReopening() || MessageDialogBuilder.okCancel( "Confirm reopening the issue", - "Are you sure you want to reopen this issue? The status will be updated on $productName and synchronized with any contributor using SonarLint in connected mode" + "Are you sure you want to reopen this issue? The status will be updated on $productName and synchronized with any contributor using SonarQube for IntelliJ in Connected Mode" ).yesText("Confirm").noText("Cancel").doNotAsk(DoNotShowAgain()).ask(project) } @@ -164,10 +164,10 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct override fun startInWriteAction() = false - override fun getText() = "SonarLint: Reopen issue" + override fun getText() = "SonarQube for IntelliJ: Reopen issue" override fun getFamilyName(): String { - return "SonarLint reopen issue" + return "SonarQube for IntelliJ reopen issue" } override fun isVisible(e: AnActionEvent): Boolean { @@ -177,7 +177,7 @@ class ReopenIssueAction(private var issue: LiveIssue? = null) : AbstractSonarAct } override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?): Boolean { - return issue?.let { canBeReopened(project, it) } ?: false + return issue?.let { canBeReopened(project, it) } == true } override fun invoke(project: Project, editor: Editor?, file: PsiFile?) { diff --git a/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt b/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt index 577fc7f902..15e3e189d5 100644 --- a/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/RestartBackendAction.kt @@ -23,10 +23,10 @@ import com.intellij.openapi.actionSystem.AnActionEvent import org.sonarlint.intellij.common.util.SonarLintUtils import org.sonarlint.intellij.core.BackendService -class RestartBackendAction : AbstractSonarAction("Restart SonarLint Service") { +class RestartBackendAction : AbstractSonarAction("Restart SonarQube for IntelliJ Service") { companion object { - const val SONARLINT_ERROR_MSG = "SonarLint service encountered an issue and has stopped working" + const val SONARLINT_ERROR_MSG = "SonarQube for IntelliJ service encountered an issue and has stopped working" } override fun actionPerformed(e: AnActionEvent) { diff --git a/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt b/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt index 0295cb3a25..b5a2ba1a1c 100644 --- a/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/RestartBackendNotificationAction.kt @@ -25,7 +25,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent import org.sonarlint.intellij.common.util.SonarLintUtils import org.sonarlint.intellij.core.BackendService -class RestartBackendNotificationAction : NotificationAction("Restart SonarLint Service") { +class RestartBackendNotificationAction : NotificationAction("Restart SonarQube for IntelliJ Service") { override fun actionPerformed(e: AnActionEvent, notification: Notification) { notification.expire() diff --git a/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt b/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt index a0bb616549..ee54e2f751 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt +++ b/src/main/java/org/sonarlint/intellij/actions/ReviewSecurityHotspotAction.kt @@ -55,8 +55,8 @@ class ReviewSecurityHotspotAction(private var serverFindingKey: String? = null, companion object { val SECURITY_HOTSPOT_KEY = DataKey.create("sonarlint_security_hotspot") - const val REVIEW_HOTSPOT_GROUP = "SonarLint: Security Hotspot Review" - private const val ERROR_TITLE = "SonarLint - Unable to review the Security Hotspot" + const val REVIEW_HOTSPOT_GROUP = "SonarQube for IntelliJ: Security Hotspot Review" + private const val ERROR_TITLE = "SonarQube for IntelliJ - Unable to review the Security Hotspot" private const val CONTENT = "The Security Hotspot status was successfully updated" } @@ -134,9 +134,9 @@ class ReviewSecurityHotspotAction(private var serverFindingKey: String? = null, override fun startInWriteAction() = false - override fun getText() = "SonarLint: Change Security Hotspot status" + override fun getText() = "SonarQube for IntelliJ: Change Security Hotspot status" - override fun getFamilyName() = "SonarLint review" + override fun getFamilyName() = "SonarQube for IntelliJ review" override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?) = serverFindingKey != null diff --git a/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java b/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java index 72492f4cd8..9985e9f109 100644 --- a/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/SonarAnalyzeAllFilesAction.java @@ -41,7 +41,7 @@ public class SonarAnalyzeAllFilesAction extends AbstractSonarAction { private static final String HIDE_WARNING_PROPERTY = "SonarLint.analyzeAllFiles.hideWarning"; public static final String WARNING_MESSAGE = "Analysing all files may take a considerable amount of time to complete.\n" - + "To get the best from SonarLint, you should preferably use the automatic analysis of the file you're working on."; + + "To get the best from SonarQube for IntelliJ, you should preferably use the automatic analysis of the file you're working on."; public SonarAnalyzeAllFilesAction() { super(); @@ -76,7 +76,7 @@ public void actionPerformed(AnActionEvent e) { static boolean userConfirmed(Project project) { if (!ApplicationManager.getApplication().isUnitTestMode() && !PropertiesComponent.getInstance().getBoolean(HIDE_WARNING_PROPERTY, false)) { - return MessageDialogBuilder.yesNo("SonarLint - Analyze All Files", WARNING_MESSAGE) + return MessageDialogBuilder.yesNo("SonarQube for IntelliJ - Analyze All Files", WARNING_MESSAGE) .yesText("Proceed") .noText("Cancel") .icon(Messages.getWarningIcon()) diff --git a/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java b/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java index 2444c4a01f..7639c6ccc4 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/ToolWindowLogAnalysisAction.java @@ -25,7 +25,7 @@ public class ToolWindowLogAnalysisAction extends AbstractSonarToggleAction { public ToolWindowLogAnalysisAction() { - super("Analysis logs", "Enable logging of SonarLint analysis", null); + super("Analysis logs", "Enable logging of SonarQube for IntelliJ analysis", null); } @Override diff --git a/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java b/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java index 0cfd226a93..563a42ec12 100644 --- a/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java +++ b/src/main/java/org/sonarlint/intellij/actions/ToolWindowVerboseModeAction.java @@ -26,7 +26,7 @@ public class ToolWindowVerboseModeAction extends AbstractSonarToggleAction { public ToolWindowVerboseModeAction() { - super("Verbose output", "Enable verbose output for SonarLint analysis", + super("Verbose output", "Enable verbose output for SonarQube for IntelliJ analysis", AllIcons.Actions.StartDebugger); } diff --git a/src/main/java/org/sonarlint/intellij/analysis/Analysis.java b/src/main/java/org/sonarlint/intellij/analysis/Analysis.java index 375579bb21..f98662d499 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/Analysis.java +++ b/src/main/java/org/sonarlint/intellij/analysis/Analysis.java @@ -101,7 +101,7 @@ private List doRun(ProgressIndicator indicator) { console.debug("Trigger: " + trigger); console.debug(String.format("[%s] %d file(s) submitted", trigger, files.size())); if (!getService(BackendService.class).isAlive()) { - console.info("Analysis skipped as SonarLint is not alive"); + console.info("Analysis skipped as SonarQube for IntelliJ is not alive"); return Collections.emptyList(); } if (!getService(project, AnalysisReadinessCache.class).isReady()) { @@ -150,13 +150,13 @@ private List doRun(ProgressIndicator indicator) { private void handleError(Throwable e, ProgressIndicator indicator) { // if cancelled, ignore any errors since they were most likely caused by the interrupt if (!isCancelled(indicator)) { - var message = "Error running SonarLint analysis"; + var message = "Error running SonarQube for IntelliJ analysis"; var console = SonarLintConsole.get(project); console.error(message, e); if (indicator.isShowing()) { - var dialogMsg = "SonarLint analysis failed: " + e.getMessage(); - runOnUiThreadAndWait(project, indicator.getModalityState(), () -> Messages.showErrorDialog(dialogMsg, "Error Running SonarLint Analysis")); + var dialogMsg = "SonarQube for IntelliJ analysis failed: " + e.getMessage(); + runOnUiThreadAndWait(project, indicator.getModalityState(), () -> Messages.showErrorDialog(dialogMsg, "Error Running SonarQube for IntelliJ Analysis")); } callback.onError(e); @@ -175,7 +175,7 @@ private boolean isCancelled(ProgressIndicator indicator) { private Summary analyzePerModule(AnalysisScope scope, ProgressIndicator indicator, TriggerType trigger) { indicator.setIndeterminate(true); - indicator.setText("Running SonarLint Analysis for " + scope.getDescription()); + indicator.setText("Running SonarQube for IntelliJ Analysis for " + scope.getDescription()); var analyzer = getService(project, SonarLintAnalyzer.class); var results = new LinkedHashMap(); diff --git a/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java b/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java index bd58e87605..3fb1ba1100 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java +++ b/src/main/java/org/sonarlint/intellij/analysis/AnalysisScope.java @@ -65,7 +65,7 @@ public boolean shouldFetchServerIssues() { } private int modulesCount() { - return filesByModule.keySet().size(); + return filesByModule.size(); } public String getDescription() { diff --git a/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java b/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java index 17c9001ce9..06d6171cc7 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java +++ b/src/main/java/org/sonarlint/intellij/analysis/AnalysisSubmitter.java @@ -58,7 +58,7 @@ @Service(Service.Level.PROJECT) public final class AnalysisSubmitter { - public static final String ANALYSIS_TASK_TITLE = "SonarLint Analysis"; + public static final String ANALYSIS_TASK_TITLE = "SonarQube for IntelliJ Analysis"; private final Project project; private final OnTheFlyFindingsHolder onTheFlyFindingsHolder; private Cancelable currentManualAnalysis; diff --git a/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java b/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java index 495341e018..2b0ecc650b 100644 --- a/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java +++ b/src/main/java/org/sonarlint/intellij/analysis/LocalFileExclusions.java @@ -113,10 +113,10 @@ private ExcludeResult checkExclusionsFromSonarLintSettings(VirtualFile file, Mod return ExcludeResult.excluded("Could not create a relative path"); } if (globalExclusions.test(relativePath)) { - return ExcludeResult.excluded("file matches exclusions defined in the SonarLint Global Settings"); + return ExcludeResult.excluded("file matches exclusions defined in the SonarQube for IntelliJ Global Settings"); } if (projectExclusions.test(relativePath)) { - return ExcludeResult.excluded("file matches exclusions defined in the SonarLint Project Settings"); + return ExcludeResult.excluded("file matches exclusions defined in the SonarQube for IntelliJ Project Settings"); } return ExcludeResult.notExcluded(); diff --git a/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt b/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt index b8c98543ff..723f749f1f 100644 --- a/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt +++ b/src/main/java/org/sonarlint/intellij/callable/ShowFindingCallable.kt @@ -61,7 +61,10 @@ class ShowFindingCallable(private val project: Project, onTheFlyFind LiveIssue::class.java -> showIssue(toolWindow) LocalTaintVulnerability::class.java -> showTaintVulnerability(toolWindow) else -> SonarLintProjectNotifications.get(project) - .notifyUnableToOpenFinding("finding", "The finding could not be detected by SonarLint in the current code.") + .notifyUnableToOpenFinding( + "finding", + "The finding could not be detected by SonarQube for IntelliJ in the current code." + ) } } } @@ -75,7 +78,7 @@ class ShowFindingCallable(private val project: Project, onTheFlyFind SonarLintProjectNotifications.get(project) .notifyUnableToOpenFinding( "Security Hotspot", - "The Security Hotspot could not be detected by SonarLint in the current code." + "The Security Hotspot could not be detected by SonarQube for IntelliJ in the current code." ) } else { val selected = @@ -83,7 +86,8 @@ class ShowFindingCallable(private val project: Project, onTheFlyFind if (!selected) { SonarLintProjectNotifications.get(project) .notifyUnableToOpenFinding( - "Security Hotspot", "The Security Hotspot could not be opened by SonarLint due to the applied filters.", + "Security Hotspot", + "The Security Hotspot could not be opened by SonarQube for IntelliJ due to the applied filters.", ClearSecurityHotspotsFiltersAction(showFinding.findingKey) ) } diff --git a/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java b/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java index 6796ec9f10..e0e556bdf9 100644 --- a/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java +++ b/src/main/java/org/sonarlint/intellij/config/SonarLintColorSettingsPage.java @@ -103,7 +103,7 @@ private static class DescriptorComparator implements Comparatorfeatures and benefits." + "Connecting SonarQube for IntelliJ to ${if (isSQ) "SonarQube Server" else "SonarQube Cloud"} will enable issues " + + "to be opened directly in your IDE and enable other features and benefits." connectedModeDescriptionLabel.addHyperlinkListener(object : HyperlinkAdapter() { override fun hyperlinkActivated(e: HyperlinkEvent) { BrowserUtil.browse(e.url) @@ -147,9 +148,10 @@ class AutomaticServerConnectionCreator(private val serverOrOrg: String, private val warningPanel = JBPanel>(BorderLayout()) redWarningIcon.icon = AllIcons.Ide.FatalError warningLabel.text = if (isSQ) { - "Always ensure that your Server URL matches your SonarQube instance. " + "Letting SonarLint connect to an untrusted SonarQube server is potentially dangerous." + "Always ensure that your Server URL matches your SonarQube Server instance. " + + "Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server is potentially dangerous." } else { - "Ensure that the organization matches your SonarCloud organization." + "Ensure that the organization matches your SonarQube Cloud organization." } warningPanel.add(redWarningIcon, BorderLayout.WEST) warningPanel.add(warningLabel, BorderLayout.CENTER) @@ -173,7 +175,7 @@ class AutomaticServerConnectionCreator(private val serverOrOrg: String, private ) tokenLabel.text = - "A token will be automatically generated to allow access to your ${if (isSQ) "SonarQube instance" else "SonarCloud organization"}." + "A token will be automatically generated to allow access to your ${if (isSQ) "SonarQube Server instance" else "SonarQube Cloud organization"}." centerPanel.add( tokenLabel, GridBagConstraints( 1, 6, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(), 0, 0 diff --git a/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java b/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java index 467c3160af..71615b5b80 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/GlobalExclusionsPanel.java @@ -58,7 +58,7 @@ public GlobalExclusionsPanel() { panel.setBorder(b); initHtmlPane(editorPane1); - SwingHelper.setHtml(editorPane1, "When a project is connected to SonarQube or SonarCloud, exclusions defined in the " + + SwingHelper.setHtml(editorPane1, "When a project is connected to SonarQube (Server, Cloud), exclusions defined in the " + "server's General Settings override your locally " + "defined exclusions.", UIUtil.getLabelForeground()); editorPane1.addHyperlinkListener(new HyperlinkAdapter() { diff --git a/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java b/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java index 3fbcbeaa78..7bcfce00f4 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java +++ b/src/main/java/org/sonarlint/intellij/config/global/ServerConnection.java @@ -139,7 +139,7 @@ public boolean isSonarQube() { } public String getProductName() { - return isSonarCloud() ? "SonarCloud" : "SonarQube"; + return isSonarCloud() ? "SonarQube Cloud" : "SonarQube Server"; } public Icon getProductIcon() { diff --git a/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java b/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java index 915f0f44e1..fca276c00a 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/ServerConnectionMgmtPanel.java @@ -82,7 +82,7 @@ private void create() { var app = ApplicationManager.getApplication(); connectionChangeListener = app.getMessageBus().syncPublisher(GlobalConfigurationListener.TOPIC); connectionList = new JBList<>(); - connectionList.getEmptyText().appendLine("Add a connection to SonarCloud or SonarQube"); + connectionList.getEmptyText().appendLine("Add a connection to SonarQube (Server, Cloud)"); connectionList.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent evt) { @@ -141,19 +141,19 @@ protected void customizeCellRenderer(JList list, ServerConnection server, int in private static JPanel initConnectionTitle() { var titlePanel = new JPanel(new HorizontalLayout(5)); - var connectionLabel = new JBLabel("Connections to"); + var connectionLabel = new JBLabel("Connections to SonarQube ("); connectionLabel.setFont(connectionLabel.getFont().deriveFont(Font.BOLD, 16f)); - var sonarCloudIcon = new JBLabel(SonarLintIcons.ICON_SONARCLOUD_16); - var sonarCloudLabel = new JBLabel("SonarCloud or"); - sonarCloudLabel.setFont(sonarCloudLabel.getFont().deriveFont(Font.BOLD, 16f)); - var sonarQubeIcon = new JBLabel(SonarLintIcons.ICON_SONARQUBE_16); - var sonarQubeLabel = new JBLabel("SonarQube"); + var sonarQubeIcon = new JBLabel(SonarLintIcons.ICON_SONARCLOUD_16); + var sonarQubeLabel = new JBLabel("Server, "); sonarQubeLabel.setFont(sonarQubeLabel.getFont().deriveFont(Font.BOLD, 16f)); + var sonarCloudIcon = new JBLabel(SonarLintIcons.ICON_SONARQUBE_16); + var sonarCloudLabel = new JBLabel("Cloud)"); + sonarCloudLabel.setFont(sonarQubeLabel.getFont().deriveFont(Font.BOLD, 16f)); titlePanel.add(connectionLabel); - titlePanel.add(sonarCloudIcon); - titlePanel.add(sonarCloudLabel); titlePanel.add(sonarQubeIcon); titlePanel.add(sonarQubeLabel); + titlePanel.add(sonarCloudIcon); + titlePanel.add(sonarCloudLabel); return titlePanel; } @@ -168,7 +168,7 @@ protected void hyperlinkActivated(HyperlinkEvent e) { connectedModeLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 15, 0)); initHtmlPane(connectedModeLabel); SwingHelper.setHtml(connectedModeLabel, "Connected Mode " + - "links SonarLint to SonarCloud or SonarQube to apply the same Clean Code standards as your team. " + + "links SonarQube for IntelliJ to SonarQube (Server, Cloud) to apply the same Clean Code standards as your team. " + "Analyze more languages, detect more issues, receive notifications about the quality gate status, and more. " + "Quality Profiles and file exclusion settings defined on the server are shared between all connected users.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java index 5cd7acaafb..be949a6301 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintAboutPanel.java @@ -65,7 +65,7 @@ public SonarLintAboutPanel() { private JComponent createSonarLintPanel() { var sonarlintIcon = new JBLabel(SonarLintIcons.SONARLINT_32); var plugin = SonarLintUtils.getService(SonarLintPlugin.class); - var title = new JBLabel("SonarLint " + plugin.getVersion() + ""); + var title = new JBLabel("SonarQube for IntelliJ " + plugin.getVersion() + ""); var linkLabel = new HyperlinkLabel("Documentation"); linkLabel.addHyperlinkListener(e -> BrowserUtil.browse(BASE_DOCS_URL)); var copyrightLabel = new JBLabel("© " + LocalDate.now().getYear() + " SonarSource"); @@ -192,12 +192,12 @@ protected void hyperlinkActivated(HyperlinkEvent e) { }); // info - var info = new JBLabel("By sharing anonymous SonarLint usage statistics, you help us understand how SonarLint is used so " + var info = new JBLabel("By sharing anonymous SonarQube for IntelliJ usage statistics, you help us understand how SonarQube for IntelliJ is used so " + "we can improve the plugin to work even better for you. We don't collect source code, IP addresses, or any personally identifying " + "information. And we don't share the data with anyone else."); // checkbox - enableTelemetryCheckBox = new JCheckBox("Share anonymous SonarLint statistics"); + enableTelemetryCheckBox = new JCheckBox("Share anonymous SonarQube for IntelliJ statistics"); enableTelemetryCheckBox.setFocusable(false); var tickOptions = new JPanel(new VerticalFlowLayout()); tickOptions.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0)); diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java index 411533da5c..372a3cd9f1 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalConfigurable.java @@ -58,7 +58,7 @@ public class SonarLintGlobalConfigurable implements Configurable, Configurable.N @Nls @Override public String getDisplayName() { - return "SonarLint"; + return "SonarQube for IntelliJ"; } @Nullable @@ -167,10 +167,10 @@ private JPanel getPanel() { rootPanel = new JPanel(new BorderLayout()); tabs = new JBTabbedPane(); - tabs.insertTab("Settings", null, settingsPanel, "Configure SonarLint for all projects", SETTINGS_TAB_INDEX); + tabs.insertTab("Settings", null, settingsPanel, "Configure SonarQube for IntelliJ for all projects", SETTINGS_TAB_INDEX); tabs.insertTab("File Exclusions", null, exclusions.getComponent(), "Configure which files should be excluded from analysis", FILE_EXCLUSIONS_TAB_INDEX); - tabs.insertTab("Rules", null, rules.getComponent(), "Choose which rules are enabled when not bound to SonarCloud or SonarQube", RULES_TAB_INDEX); - tabs.insertTab("About", null, about.getComponent(), "About SonarLint", ABOUT_TAB_INDEX); + tabs.insertTab("Rules", null, rules.getComponent(), "Choose which rules are enabled when not bound to SonarQube (Server, Cloud)", RULES_TAB_INDEX); + tabs.insertTab("About", null, about.getComponent(), "About SonarQube for IntelliJ", ABOUT_TAB_INDEX); rootPanel.add(tabs, BorderLayout.CENTER); } diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java index 9afac99c4b..e04ad19a58 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalOptionsPanel.java @@ -51,8 +51,9 @@ import static org.sonarlint.intellij.documentation.SonarLintDocumentation.Intellij.FOCUS_ON_NEW_CODE_LINK; public class SonarLintGlobalOptionsPanel implements ConfigurationPanel { - private static final String NODE_JS_TOOLTIP = "SonarLint requires Node.js to analyze some languages. You can provide an explicit path for the node executable here or leave " + - "this field blank to let SonarLint look for it using your PATH environment variable." + + private static final String NODE_JS_TOOLTIP = "SonarQube for IntelliJ requires Node.js to analyze some languages. " + + "You can provide an explicit path for the node executable here or leave " + + "this field blank to let SonarQube for IntelliJ look for it using your PATH environment variable." + " Restarting your IDE is recommended."; private JPanel rootPane; private JBCheckBox autoTrigger; @@ -113,7 +114,7 @@ private JPanel createTopPanel() { var nodeJsPathWithBrowse = new TextFieldWithBrowseButton(nodeJsPath); nodeJsPathWithBrowse.setToolTipText(NODE_JS_TOOLTIP); var fileChooser = FileChooserDescriptorFactory.createSingleLocalFileDescriptor(); - nodeJsPathWithBrowse.addBrowseFolderListener("Select Node.js Binary", "Select Node.js binary to be used by SonarLint", null, fileChooser); + nodeJsPathWithBrowse.addBrowseFolderListener("Select Node.js Binary", "Select Node.js binary to be used by SonarQube for IntelliJ", null, fileChooser); optionsPanel.add(nodeJsPathWithBrowse, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, WEST, GridBagConstraints.HORIZONTAL, JBUI.emptyInsets(), 0, 0)); diff --git a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java index 0716ed65cb..2c5a1400d7 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java +++ b/src/main/java/org/sonarlint/intellij/config/global/SonarLintGlobalSettingsPresentableName.java @@ -24,6 +24,6 @@ public class SonarLintGlobalSettingsPresentableName extends State.NameGetter { @Override public String get() { - return "SonarLint settings"; + return "SonarQube for IntelliJ settings"; } } diff --git a/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java b/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java index f28599350b..9fd28a204a 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/global/rules/RuleConfigurationPanel.java @@ -410,11 +410,11 @@ private void createUIComponents() { var introLabel = new JEditorPane(); initHtmlPane(introLabel); - SwingHelper.setHtml(introLabel, "Configure rules used for Sonarlint analysis for projects not in Connected Mode.", + SwingHelper.setHtml(introLabel, "Configure rules used for SonarQube for IntelliJ analysis for projects not in Connected Mode.", UIUtil.getLabelForeground()); var configureRuleLabel = new JEditorPane(); initHtmlPane(configureRuleLabel); - SwingHelper.setHtml(configureRuleLabel, "Connecting your project to SonarQube or SonarCloud syncs SonarLint with the " + + SwingHelper.setHtml(configureRuleLabel, "Connecting your project to SonarQube (Server, Cloud) syncs SonarQube for IntelliJ with the " + "Quality Profile standards defined on the server, allowing you to share the same rules configuration with your team.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); var ruleServerLabel = new JEditorPane(); @@ -425,8 +425,8 @@ protected void hyperlinkActivated(HyperlinkEvent e) { RULE_SELECTION_PAGE.browseWithTelemetry(); } }); - SwingHelper.setHtml(ruleServerLabel, "  When a project is connected to SonarQube or " + - "SonarCloud, configuration from the server applies.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); + SwingHelper.setHtml(ruleServerLabel, "  When a project is connected to SonarQube (Server, Cloud), " + + "configuration from the server applies.", JBUI.CurrentTheme.ContextHelp.FOREGROUND); var labelPanel = new JBPanel<>(new VerticalFlowLayout(0, 0)); labelPanel.add(introLabel); labelPanel.add(configureRuleLabel); diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java b/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java index b44bfba919..802b100ded 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/NotificationsStep.java @@ -50,7 +50,7 @@ public JComponent getComponent() { @Override public void _init() { final boolean isSc = model.getServerType() == WizardModel.ServerType.SONARCLOUD; - final String sqOrSc = isSc ? "SonarCloud" : "SonarQube"; + final String sqOrSc = isSc ? "SonarQube Cloud" : "SonarQube Server"; notificationsCheckBox.setText("Receive notifications from " + sqOrSc); notificationsCheckBox.setSelected(!model.isNotificationsDisabled()); final String docUrl = isSc ? "https://docs.sonarcloud.io/advanced-setup/sonarlint-smart-notifications/" : diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form index 146ec04fcd..f7c2382bb2 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.form @@ -168,7 +168,7 @@ - + diff --git a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java index cba6b9c30e..fdebe410af 100644 --- a/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java +++ b/src/main/java/org/sonarlint/intellij/config/global/wizard/ServerStep.java @@ -102,10 +102,10 @@ protected void textChanged(DocumentEvent e) { "and extends the CI/CD workflow to systematically help developers and organizations deliver Clean Code."; sonarCloudDescription.setText(cloudMainText); - initEditorPane(sonarCloudFree, "SonarCloud is entirely free for open source projects", + initEditorPane(sonarCloudFree, "SonarQube Cloud is entirely free for open source projects", SONARCLOUD_PRODUCT_PAGE); - initEditorPane(sonarQubeFree, "SonarQube offers a free Community Edition", + initEditorPane(sonarQubeFree, "SonarQube Server offers a free Community Build", SONARQUBE_EDITIONS_DOWNLOADS); initEditorPane(compareProducts, "Discover which option is the best for your team here", diff --git a/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java b/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java index 4bb9eaa55c..1652e3ad98 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java +++ b/src/main/java/org/sonarlint/intellij/config/project/AddEditExclusionDialog.java @@ -66,20 +66,20 @@ public class AddEditExclusionDialog extends DialogWrapper { public AddEditExclusionDialog(Project project) { super(project, false); this.project = project; - setTitle("Add SonarLint File Exclusion"); + setTitle("Add SonarQube for IntelliJ File Exclusion"); init(); FileChooserDescriptor fileChooser = new FileChooserDescriptor(true, false, false, true, false, false); fileChooser.setRoots(ProjectRootManager.getInstance(project).getContentRoots()); fileTextField.addBrowseFolderListener("Select File to Exclude", - "Select the file which will be excluded from SonarLint analysis", + "Select the file which will be excluded from SonarQube for IntelliJ analysis", project, fileChooser); FileChooserDescriptor directoryChooser = FileChooserDescriptorFactory.createSingleFolderDescriptor(); directoryChooser.setRoots(ProjectRootManager.getInstance(project).getContentRoots()); directoryTextField.addBrowseFolderListener("Select Directory to Exclude", - "Select the directory which will be excluded from SonarLint analysis", + "Select the directory which will be excluded from SonarQube for IntelliJ analysis", project, directoryChooser); DocumentListener docListener = new DocumentAdapter() { @@ -140,7 +140,7 @@ public ExclusionItem getExclusion() { } public void setExclusion(@Nullable ExclusionItem item) { - setTitle("Edit SonarLint File Exclusion"); + setTitle("Edit SonarQube for IntelliJ File Exclusion"); if (item != null) { switch (item.type()) { diff --git a/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java b/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java index 0f1b3cb419..49df419c13 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/ProjectExclusionsPanel.java @@ -56,7 +56,7 @@ public ProjectExclusionsPanel(Project project) { + "\">override your locally defined exclusions."; editorPane2.setVisible(false); } else { - message = "When a project is connected to SonarQube or SonarCloud, exclusions defined in the server's General Settings " + + message = "When a project is connected to SonarQube (Server, Cloud), exclusions defined in the server's General Settings " + "override your locally defined exclusions."; editorPane2.setVisible(true); } diff --git a/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt b/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt index ac3d06cf6e..6182657336 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt +++ b/src/main/java/org/sonarlint/intellij/config/project/SearchProjectKeyDialog.kt @@ -58,7 +58,7 @@ class SearchProjectKeyDialog( private lateinit var searchTextField: SearchTextField init { - title = "Select " + (if (isSonarCloud) "SonarCloud" else "SonarQube") + " Project To Bind" + title = "Select " + (if (isSonarCloud) "SonarQube Cloud" else "SonarQube Server") + " Project To Bind" init() } diff --git a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java index 0bba0cd5b6..0ec4313f59 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectBindPanel.java @@ -218,12 +218,12 @@ private void setConnectionList(Collection connections, @Nullab private void createBindPanel() { bindPanel = new JPanel(new GridBagLayout()); - var bindContext = new JBLabel("Complete your Connected Mode setup by binding your local project to your SonarCloud or SonarQube project " + + var bindContext = new JBLabel("Complete your Connected Mode setup by binding your local project to your SonarQube (Server, Cloud) project " + "to benefit from the same rules and settings that are used to inspect the project on the server."); bindContext.setFontColor(UIUtil.FontColor.BRIGHTER); boolean pluralizeProject = ProjectAttachProcessor.canAttachToProject() && ModuleManager.getInstance(project).getModules().length > 1; - bindEnable = new JBCheckBox("Bind project" + (pluralizeProject ? "s" : "") + " to SonarCloud / SonarQube", true); + bindEnable = new JBCheckBox("Bind project" + (pluralizeProject ? "s" : "") + " to SonarQube (Server, Cloud)", true); bindEnable.addItemListener(new BindItemListener()); configureConnectionButton = new JButton(); @@ -253,7 +253,7 @@ public void actionPerformed(ActionEvent e) { projectKeyLabel = new JLabel("Project key:"); projectKeyTextField = new JBTextField(); - projectKeyTextField.getEmptyText().setText("Input SonarCloud/SonarQube project key or search one"); + projectKeyTextField.getEmptyText().setText("Input SonarQube (Server, Cloud) project key or search one"); searchProjectButton = new JButton(); searchProjectButton.setAction(new AbstractAction() { diff --git a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java index 186c7c78d1..878dbf4949 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectPropertiesPanel.java @@ -49,7 +49,7 @@ public JPanel create() { tableModel = new PropertiesTableModel(); // Unfortunately TableModel's listener does not work properly, it doesn't receive events related to changed cells. final var table = new JBTable(tableModel); - table.getEmptyText().setText("No SonarLint properties configured for this project"); + table.getEmptyText().setText("No SonarQube for IntelliJ properties configured for this project"); var tablePanel = ToolbarDecorator.createDecorator(table) .disableUpAction() diff --git a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java index 62f3ccefc7..ae41c041b6 100644 --- a/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java +++ b/src/main/java/org/sonarlint/intellij/config/project/SonarLintProjectSettingsPanel.java @@ -60,7 +60,7 @@ public SonarLintProjectSettingsPanel(Project project) { rootPropertiesPane = new JPanel(new BorderLayout()); rootPropertiesPane.add(propsPanel.create(), BorderLayout.CENTER); - tabs.insertTab("Bind to SonarCloud / SonarQube", null, rootBindPane, "Configure the binding to SonarCloud or a SonarQube server", 0); + tabs.insertTab("Bind to SonarQube (Server, Cloud)", null, rootBindPane, "Configure the binding to SonarQube (Server, Cloud)", 0); tabs.insertTab("File Exclusions", null, exclusionsPanel.getComponent(), "Configure which files to exclude from analysis", 1); tabs.insertTab("Analysis Properties", null, rootPropertiesPane, "Configure analysis properties", 2); diff --git a/src/main/java/org/sonarlint/intellij/core/BackendService.kt b/src/main/java/org/sonarlint/intellij/core/BackendService.kt index 25759d3d42..e1b97302f2 100644 --- a/src/main/java/org/sonarlint/intellij/core/BackendService.kt +++ b/src/main/java/org/sonarlint/intellij/core/BackendService.kt @@ -228,28 +228,34 @@ class BackendService : Disposable { } private fun createServiceStartingTask(): Task.Backgroundable { - return object : Task.Backgroundable(null, "Starting SonarLint service\u2026", false, ALWAYS_BACKGROUND) { + return object : Task.Backgroundable(null, "Starting SonarQube for IntelliJ service\u2026", false, ALWAYS_BACKGROUND) { override fun run(indicator: ProgressIndicator) { try { val sloop = startSloopProcess() this@BackendService.sloop = sloop getService(GlobalLogOutput::class.java).log("Migrating the storage...", ClientLogOutput.Level.INFO) migrateStoragePath() - getService(GlobalLogOutput::class.java).log("Listening for SonarLint service exit...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log( + "Listening for SonarQube for IntelliJ service exit...", + ClientLogOutput.Level.INFO + ) listenForProcessExit(sloop) - getService(GlobalLogOutput::class.java).log("Initializing the SonarLint service...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log( + "Initializing the SonarQube for IntelliJ service...", + ClientLogOutput.Level.INFO + ) initRpcServer(sloop.rpcServer).get(1, TimeUnit.MINUTES) - getService(GlobalLogOutput::class.java).log("SonarLint service initialized...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log("SonarQube for IntelliJ service initialized...", ClientLogOutput.Level.INFO) backendFuture.complete(sloop.rpcServer) } catch (t: TimeoutException) { GlobalLogOutput.get().log( - "The 'Starting SonarLint service...' task timed out, please capture thread dumps of the 'SonarLintServerCli' process and report the problem to the SonarLint maintainers", + "The 'Starting SonarQube for IntelliJ service...' task timed out, please capture thread dumps of the 'SonarLintServerCli' process and report the problem to the SonarQube for IntelliJ maintainers", ClientLogOutput.Level.ERROR ) handleSloopExited() backendFuture.cancel(true) } catch (t: Throwable) { - GlobalLogOutput.get().logError("Cannot start the SonarLint service", t) + GlobalLogOutput.get().logError("Cannot start the SonarQube for IntelliJ service", t) handleSloopExited() backendFuture.cancel(true) } @@ -267,14 +273,14 @@ class BackendService : Disposable { false } else true } - getService(GlobalLogOutput::class.java).log("Starting the SonarLint service process...", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log("Starting the SonarQube for IntelliJ service process...", ClientLogOutput.Level.INFO) val sloopLauncher = this.defaultSloopLauncher ?: SloopLauncher(SonarLintIntelliJClient) val customJrePath = getPathProperty("sonarlint.jre.path")?.also { getService(GlobalLogOutput::class.java).log("Custom JRE detected: $it", ClientLogOutput.Level.INFO) } val jreHomePath = customJrePath ?: getPathProperty("java.home") val sloopPath = getService(SonarLintPlugin::class.java).path.resolve("sloop") - getService(GlobalLogOutput::class.java).log("Listing SonarLint service files:", ClientLogOutput.Level.INFO) + getService(GlobalLogOutput::class.java).log("Listing SonarQube for IntelliJ service files:", ClientLogOutput.Level.INFO) sloopPath.toFile().walkTopDown().forEach { file -> getService(GlobalLogOutput::class.java).log(file.absolutePath, ClientLogOutput.Level.INFO) } @@ -323,7 +329,7 @@ class BackendService : Disposable { InitializeParams( ClientConstantInfoDto( ApplicationInfo.getInstance().versionName, - "SonarLint IntelliJ " + getService(SonarLintPlugin::class.java).version + "SonarQube for IntelliJ " + getService(SonarLintPlugin::class.java).version ), getTelemetryConstantAttributes(), getHttpConfiguration(), diff --git a/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt b/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt index 2c68d6e335..1e861f12d2 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt +++ b/src/main/java/org/sonarlint/intellij/editor/ApplyQuickFixIntentionAction.kt @@ -36,8 +36,8 @@ import org.sonarlint.intellij.finding.RangeMarkerEdit import org.sonarlint.intellij.telemetry.SonarLintTelemetry class ApplyQuickFixIntentionAction(private val fix: QuickFix, private val ruleKey: String, private val invokedInPreview: Boolean) : IntentionAction, PriorityAction, Iconable { - override fun getText() = "SonarLint: " + fix.message - override fun getFamilyName() = "SonarLint quick fix" + override fun getText() = "SonarQube for IntelliJ: " + fix.message + override fun getFamilyName() = "SonarQube for IntelliJ quick fix" override fun startInWriteAction() = true override fun getIcon(flags: Int) = AllIcons.Actions.IntentionBulb override fun getPriority() = PriorityAction.Priority.TOP diff --git a/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java index 76b2e06ba0..2359062223 100644 --- a/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/DisableRuleIntentionAction.java @@ -46,11 +46,11 @@ public class DisableRuleIntentionAction implements IntentionAction, LowPriorityA } @Nls @NotNull @Override public String getText() { - return "SonarLint: Disable rule '" + ruleKey + "'"; + return "SonarQube for IntelliJ: Disable rule '" + ruleKey + "'"; } @Nls @NotNull @Override public String getFamilyName() { - return "SonarLint disable rule"; + return "SonarQube for IntelliJ disable rule"; } @Override public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) { diff --git a/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt b/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt index cd4fab27c7..6470ced047 100644 --- a/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt +++ b/src/main/java/org/sonarlint/intellij/editor/EditorDecorator.kt @@ -196,7 +196,7 @@ class EditorDecorator(private val project: Project) { .severity(HighlightSeverity.ERROR) .textAttributes(SonarLintTextAttributes.SELECTED) if (!message.isNullOrEmpty() && "..." != message) { - builder.descriptionAndTooltip("SonarLint: $message") + builder.descriptionAndTooltip("SonarQube for IntelliJ: $message") } return builder.create()?.let { hl -> computeReadActionSafely { Highlight(location.document, hl) } } } diff --git a/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java index 6db2dfa5ac..8231956dd5 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/ShowLocationsIntentionAction.java @@ -44,11 +44,11 @@ public ShowLocationsIntentionAction(LiveFinding finding, FindingContext context) } @Nls @NotNull @Override public String getText() { - return "SonarLint: Show " + (context.hasUniqueFlow() ? "issue locations" : "data flows"); + return "SonarQube for IntelliJ: Show " + (context.hasUniqueFlow() ? "issue locations" : "data flows"); } @Nls @NotNull @Override public String getFamilyName() { - return "SonarLint locations"; + return "SonarQube for IntelliJ locations"; } @Override public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) { diff --git a/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java index 1cc0be9dd1..e6f40fed61 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/ShowRuleDescriptionIntentionAction.java @@ -44,12 +44,12 @@ public ShowRuleDescriptionIntentionAction(LiveFinding liveFinding) { @Override public @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull String getText() { - return "SonarLint: Show rule description '" + liveFinding.getRuleKey() + "'"; + return "SonarQube for IntelliJ: Show rule description '" + liveFinding.getRuleKey() + "'"; } @Override public @NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String getFamilyName() { - return "SonarLint show issue description"; + return "SonarQube for IntelliJ show issue description"; } @Override diff --git a/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java b/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java index dae4ecbba4..cdea368f4a 100644 --- a/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java +++ b/src/main/java/org/sonarlint/intellij/editor/ShowTaintVulnerabilityRuleDescriptionIntentionAction.java @@ -45,12 +45,12 @@ public ShowTaintVulnerabilityRuleDescriptionIntentionAction(LocalTaintVulnerabil @Override public @Nls(capitalization = Nls.Capitalization.Sentence) @NotNull String getText() { - return "SonarLint: Show rule description '" + taintVulnerability.getRuleKey() + "'"; + return "SonarQube for IntelliJ: Show rule description '" + taintVulnerability.getRuleKey() + "'"; } @Override public @NotNull @Nls(capitalization = Nls.Capitalization.Sentence) String getFamilyName() { - return "SonarLint show taint vulnerability description"; + return "SonarQube for IntelliJ show taint vulnerability description"; } @Override diff --git a/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java b/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java index 443b616bac..80193fbf5c 100644 --- a/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java +++ b/src/main/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSource.java @@ -47,13 +47,13 @@ public class BlameSonarSource extends ErrorReportSubmitter { private static final String COMMUNITY_ROOT_URL = "https://community.sonarsource.com/"; private static final String COMMUNITY_FAULT_CATEGORY_URL = COMMUNITY_ROOT_URL + "tags/c/" + BUG_FAULT_CATEGORY_ID + "/" + INTELLIJ_TAG; private static final String COMMUNITY_NEW_TOPIC_URL = COMMUNITY_ROOT_URL + "new-topic" - + "?title=Error+in+SonarLint+for+IntelliJ" + + "?title=Error+in+SonarQube+for+IntelliJ" + "&category_id=" + BUG_FAULT_CATEGORY_ID + "&tags=sonarlint," + INTELLIJ_TAG; @Override public @NotNull String getReportActionText() { - return "Report to SonarSource"; + return "Report to Sonar"; } @Override @@ -89,7 +89,7 @@ String buildBody(@NotNull IdeaLoggingEvent[] events, @Nullable String additional body.append("* Java: ").append(System.getProperty("java.vendor")).append(" ").append(System.getProperty("java.version")).append("\n"); body.append("* OS: ").append(System.getProperty("os.name")).append(" ").append(System.getProperty("os.arch")).append("\n"); body.append("* IDE: ").append(ApplicationInfo.getInstance().getFullApplicationName()).append("\n"); - body.append("* SonarLint: ").append(SonarLintUtils.getService(SonarLintPlugin.class).getVersion()).append("\n"); + body.append("* SonarQube for IntelliJ: ").append(SonarLintUtils.getService(SonarLintPlugin.class).getVersion()).append("\n"); body.append("\n"); if (additionalInfo != null) { body.append(additionalInfo); diff --git a/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java b/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java index 9d9a79b544..acaed956e7 100644 --- a/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java +++ b/src/main/java/org/sonarlint/intellij/java/JavaAnalysisConfigurator.java @@ -210,7 +210,7 @@ private static boolean isExported(OrderEntry entry) { private static void processJdkOrderEntry(final Module module, JavaModuleClasspath moduleClasspath, Sdk jdk) { var jdkHomePath = jdk.getHomePath(); if (moduleClasspath.getJdkHome() != null) { - SonarLintConsole.get(module.getProject()).info("Multiple Jdk configured for module: " + module.getName()); + SonarLintConsole.get(module.getProject()).info("Multiple JDK configured for module: " + module.getName()); } else { moduleClasspath.setJdkHome(jdkHomePath); } diff --git a/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java b/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java index 984e15cd73..2af77c15a5 100644 --- a/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java +++ b/src/main/java/org/sonarlint/intellij/messages/AnalysisListener.java @@ -28,7 +28,7 @@ * Notifies about analysis tasks starting. It will be called for any analysis task, regardless of the trigger, if it is background or not, etc. */ public interface AnalysisListener { - Topic TOPIC = Topic.create("SonarLint analysis start", AnalysisListener.class); + Topic TOPIC = Topic.create("SonarQube for IntelliJ Analysis Start", AnalysisListener.class); void started(Collection files, TriggerType trigger); diff --git a/src/main/java/org/sonarlint/intellij/messages/StatusListener.java b/src/main/java/org/sonarlint/intellij/messages/StatusListener.java index 518ec1ef5f..72660902fc 100644 --- a/src/main/java/org/sonarlint/intellij/messages/StatusListener.java +++ b/src/main/java/org/sonarlint/intellij/messages/StatusListener.java @@ -24,7 +24,7 @@ @FunctionalInterface public interface StatusListener { - Topic SONARLINT_STATUS_TOPIC = Topic.create("SonarLint Analyzer Status", StatusListener.class); + Topic SONARLINT_STATUS_TOPIC = Topic.create("SonarQube for IntelliJ Analyzer Status", StatusListener.class); /** * Called when the status of the user-initiated analysis changes. diff --git a/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java b/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java index 7700054540..fd49ba6f27 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java +++ b/src/main/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotifications.java @@ -42,10 +42,10 @@ public static void resetCachedMessages() { public static void notifyOnceForSkippedPlugins(Project project, org.sonarsource.sonarlint.core.rpc.protocol.common.Language language, DidSkipLoadingPluginParams.SkipReason reason, String minVersion, @Nullable String currentVersion) { var languageLabel = Language.valueOf(language.name()).getLabel(); - final var title = "SonarLint failed to analyze " + languageLabel + " code"; + final var title = "SonarQube for IntelliJ failed to analyze " + languageLabel + " code"; if (reason == DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_JRE) { var content = String.format( - "SonarLint requires Java runtime version %s or later to analyze %s code. Current version is %s.", + "SonarQube for IntelliJ requires Java runtime version %s or later to analyze %s code. Current version is %s.", minVersion, languageLabel, currentVersion); createNotificationOnce(project, title, content, new OpenLinkAction("https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run" + @@ -53,11 +53,11 @@ public static void notifyOnceForSkippedPlugins(Project project, org.sonarsource. "How to change the IDE-running JDK?")); } else if (reason == DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_NODE_JS) { var content = new StringBuilder( - String.format("SonarLint requires Node.js runtime version %s or later to analyze %s code.", minVersion, languageLabel)); + String.format("SonarQube for IntelliJ requires Node.js runtime version %s or later to analyze %s code.", minVersion, languageLabel)); if (currentVersion != null) { content.append(String.format(" Current version is %s.", currentVersion)); } - content.append("
Please configure the Node.js path in the SonarLint settings."); + content.append("
Please configure the Node.js path in the SonarQube for IntelliJ settings."); createNotificationOnce(project, title, content.toString(), new OpenGlobalSettingsAction(project)); } } diff --git a/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt b/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt index 83b2917ce8..39a975f7b8 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt +++ b/src/main/java/org/sonarlint/intellij/notifications/ClearSecurityHotspotsFiltersAction.kt @@ -33,7 +33,7 @@ class ClearSecurityHotspotsFiltersAction(private val securityHotspotKey: String) SonarLintActions.getInstance().includeResolvedHotspotAction().setSelected(e, true) if (!SonarLintUtils.getService(it, SonarLintToolWindow::class.java).trySelectSecurityHotspot(securityHotspotKey)) { SonarLintProjectNotifications.get(it) - .notifyUnableToOpenFinding("Security Hotspot", "The Security Hotspot could not be opened by SonarLint.") + .notifyUnableToOpenFinding("Security Hotspot", "The Security Hotspot could not be opened by SonarQube for IntelliJ") } } notification.expire() diff --git a/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java b/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java index e8f5cdb754..50f60561e4 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java +++ b/src/main/java/org/sonarlint/intellij/notifications/OpenGlobalSettingsAction.java @@ -25,6 +25,6 @@ class OpenGlobalSettingsAction extends OpenConfigurableAction { OpenGlobalSettingsAction(Project project) { - super(project, "Open SonarLint Settings", new SonarLintGlobalConfigurable()); + super(project, "Open SonarQube for IntelliJ Settings", new SonarLintGlobalConfigurable()); } } diff --git a/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java b/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java index df5e4f9b3d..08feba57bf 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java +++ b/src/main/java/org/sonarlint/intellij/notifications/OpenProjectSettingsAction.java @@ -25,7 +25,7 @@ class OpenProjectSettingsAction extends OpenConfigurableAction { OpenProjectSettingsAction(Project project) { - this(project, "Open SonarLint Project Configuration"); + this(project, "Open SonarQube for IntelliJ Project Configuration"); } OpenProjectSettingsAction(Project project, String text) { diff --git a/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt b/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt index eedc64c155..6794daf6b2 100644 --- a/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt +++ b/src/main/java/org/sonarlint/intellij/notifications/SonarLintProjectNotifications.kt @@ -57,15 +57,15 @@ import org.sonarsource.sonarlint.core.rpc.protocol.client.smartnotification.Show class SonarLintProjectNotifications(private val myProject: Project) { companion object { - private const val TITLE_SONARLINT_INVALID_BINDING = "SonarLint - Invalid binding" - private const val TITLE_SONARLINT_SUGGESTIONS = "SonarLint suggestions" + private const val TITLE_SONARLINT_INVALID_BINDING = "SonarQube for IntelliJ - Invalid binding" + private const val TITLE_SONARLINT_SUGGESTIONS = "SonarQube for IntelliJ suggestions" fun get(project: Project): SonarLintProjectNotifications { return SonarLintUtils.getService(project, SonarLintProjectNotifications::class.java) } fun projectLessNotification(title: String?, message: String, type: NotificationType, action: AnAction? = null): Notification { - return NotificationGroupManager.getInstance().getNotificationGroup("SonarLint").createNotification( + return NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ").createNotification( title ?: "", message, type @@ -78,15 +78,22 @@ class SonarLintProjectNotifications(private val myProject: Project) { } } - private val inContextPromotionGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: In Context Promotions") - private val bindingProblemGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Server Binding Errors") - private val serverNotificationsGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Server Notifications") - private val bindingSuggestionGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Binding Suggestions") - private val openInIdeGroup: NotificationGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Open in IDE") - private val secretDetectionGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Secrets detection") - private val taintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Taint vulnerabilities") - private val analyzerRequirementGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint: Analyzer Requirement") - private val sonarlintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarLint") + private val inContextPromotionGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: In Context Promotions") + private val bindingProblemGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Server Binding Errors") + private val serverNotificationsGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Server Notifications") + private val bindingSuggestionGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Binding Suggestions") + private val openInIdeGroup: NotificationGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Open in IDE") + private val secretDetectionGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Secrets detection") + private val taintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Taint vulnerabilities") + private val analyzerRequirementGroup = + NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ: Analyzer Requirement") + private val sonarlintGroup = NotificationGroupManager.getInstance().getNotificationGroup("SonarQube for IntelliJ") private var storageErrorNotificationShown = AtomicBoolean(false) private var lastBindingSuggestion: Notification? = null @@ -118,8 +125,8 @@ class SonarLintProjectNotifications(private val myProject: Project) { content, NotificationType.INFORMATION ).apply { - addAction(OpenTrackedLinkAction("Try SonarCloud for free", LinkTelemetry.SONARCLOUD_SIGNUP_PAGE)) - addAction(OpenTrackedLinkAction("Download SonarQube", LinkTelemetry.SONARQUBE_EDITIONS_DOWNLOADS)) + addAction(OpenTrackedLinkAction("Try SonarQube Cloud for free", LinkTelemetry.SONARCLOUD_SIGNUP_PAGE)) + addAction(OpenTrackedLinkAction("Download SonarQube Server", LinkTelemetry.SONARQUBE_EDITIONS_DOWNLOADS)) addAction(OpenInBrowserAction("Learn more", null, CONNECTED_MODE_BENEFITS_LINK)) addAction(DontAskAgainAction()) icon = SonarLintIcons.SONARLINT @@ -138,7 +145,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { ) } else { notifyBindingSuggestions( - "Bind this project to SonarCloud or SonarQube?", + "Bind this project to SonarQube (Server, Cloud)?", if (suggestedBindings.isEmpty()) OpenProjectSettingsAction( myProject, "Configure binding" @@ -167,7 +174,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { fun notifyUnableToOpenFinding(type: String, message: String, vararg mainActions: AnAction) { expireCurrentFindingNotificationIfNeeded() currentOpenFindingNotification = openInIdeGroup.createNotification( - "SonarLint - Unable to open $type", + "SonarQube for IntelliJ - Unable to open $type", message, NotificationType.INFORMATION ).apply { @@ -198,7 +205,7 @@ class SonarLintProjectNotifications(private val myProject: Project) { } val isSonarCloud = connection.map { obj: ServerConnection -> obj.isSonarCloud }.orElse(false) - val label = if (isSonarCloud) "SonarCloud" else "SonarQube" + val label = if (isSonarCloud) "SonarQube Cloud" else "SonarQube Server" serverNotificationsGroup.createNotification( "$label Notification", smartNotificationParams.text, @@ -256,10 +263,10 @@ class SonarLintProjectNotifications(private val myProject: Project) { fun sendNotification() { secretDetectionGroup.createNotification( - "SonarLint: secret(s) detected", - "SonarLint detected some secrets in one of the open files. " + + "SonarQube for IntelliJ: secret(s) detected", + "SonarQube for IntelliJ detected some secrets in one of the open files. " + "We strongly advise you to review those secrets and ensure they are not committed into repositories. " + - "Please refer to the SonarLint tool window for more information.", + "Please refer to the SonarQube for IntelliJ tool window for more information.", NotificationType.WARNING ).apply { icon = SonarLintIcons.SONARLINT diff --git a/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt b/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt index c3efeafc37..9f49b08461 100644 --- a/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt +++ b/src/main/java/org/sonarlint/intellij/sharing/AutomaticSharedConfigCreator.kt @@ -98,11 +98,11 @@ class AutomaticSharedConfigCreator( private val tokenGenerationButton = JButton("Generate Token") init { - title = if (isSQ) "Connect to This SonarQube Server?" else "Connect to SonarCloud?" + title = if (isSQ) "Connect to This SonarQube Server?" else "Connect to SonarQube Cloud?" val connectionNames = getGlobalSettings().serverNames connectionNameField.text = findFirstUniqueConnectionName(connectionNames, orgOrServerUrl) - val connectionActionName = if (isSQ) "Connect to This SonarQube Server" else "Connect to SonarCloud" + val connectionActionName = if (isSQ) "Connect to This SonarQube Server" else "Connect to SonarQube Cloud" createConnectionAction = object : DialogWrapperAction(connectionActionName) { init { putValue(DEFAULT_ACTION, true) @@ -168,11 +168,11 @@ class AutomaticSharedConfigCreator( .orElseThrow { IllegalStateException("Unable to find connection '${connectionNameField.text}'") } getService(project, ProjectBindingManager::class.java).bindTo(connection, projectKey, emptyMap(), bindingMode) - val connectionTypeMessage = if (isSQ) "SonarQube server" else "SonarCloud organization" + val connectionTypeMessage = if (isSQ) "SonarQube Server" else "SonarQube Cloud organization" SonarLintProjectNotifications.get(project).simpleNotification( "Project successfully bound", "Local project bound to project '$projectKey' of $connectionTypeMessage '${connection.name}'. " + - "You can now enjoy all capabilities of SonarLint Connected Mode. The binding of this project can be updated in the SonarLint settings.", + "You can now enjoy all capabilities of SonarQube for IntelliJ Connected Mode. The binding of this project can be updated in the SonarQube for IntelliJ settings.", NotificationType.INFORMATION, OpenInBrowserAction("Learn more", null, SonarLintDocumentation.Intellij.CONNECTED_MODE_BENEFITS_LINK) ) @@ -191,9 +191,9 @@ class AutomaticSharedConfigCreator( GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTH, GridBagConstraints.NONE, JBUI.insets(0, 10), 0, 18) ) - val sqOrScMessage = if (isSQ) "SonarQube" else "SonarCloud" + val sqOrScMessage = if (isSQ) "SonarQube Server" else "SonarQube Cloud" connectedModeDescriptionLabel.text = - "Connect SonarLint with $sqOrScMessage to apply the same Clean Code standards as your team, analyze more languages, " + + "Connect SonarQube for IntelliJ with $sqOrScMessage to apply the same Clean Code standards as your team, analyze more languages, " + "detect more issues, and receive notifications about the quality gate status." connectedModeDescriptionLabel.addHyperlinkListener(object : HyperlinkAdapter() { override fun hyperlinkActivated(e: HyperlinkEvent) { @@ -205,7 +205,7 @@ class AutomaticSharedConfigCreator( GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, JBUI.insetsBottom(20), 0, 0) ) - connectionLabel.text = if (isSQ) "Server URL" else "SonarCloud organization" + connectionLabel.text = if (isSQ) "Server URL" else "SonarQube Cloud organization" projectKeyLabel.text = "Project key" centerPanel.add( projectKeyLabel, @@ -229,8 +229,8 @@ class AutomaticSharedConfigCreator( if (isSQ) { redWarningIcon.icon = AllIcons.Ide.FatalError - warningLabel.text = "Always ensure that your Server URL matches your SonarQube instance. " + - "Letting SonarLint connect to an untrusted SonarQube server is potentially dangerous." + warningLabel.text = "Always ensure that your Server URL matches your SonarQube Server instance. " + + "Letting SonarQube for IntelliJ connect to an untrusted SonarQube Server is potentially dangerous." val warningPanel = JBPanel>(BorderLayout()).apply { add(redWarningIcon, BorderLayout.WEST) add(warningLabel, BorderLayout.CENTER) diff --git a/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt b/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt index 103a195abc..19310d6fc0 100644 --- a/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt +++ b/src/main/java/org/sonarlint/intellij/sharing/ConfigurationSharing.kt @@ -129,7 +129,7 @@ class ConfigurationSharing { } val connectionKind = getService(project, ProjectBindingManager::class.java) - .tryGetServerConnection().map { if (it.isSonarCloud) "SonarCloud organization" else "SonarQube server" }.orElse(null) + .tryGetServerConnection().map { if (it.isSonarCloud) "SonarQube Cloud organization" else "SonarQube Server" }.orElse(null) ?: run { SonarLintConsole.get(project).error("Connection is not present") return false diff --git a/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt b/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt index 2d9a24b61d..539739f20d 100644 --- a/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt +++ b/src/main/java/org/sonarlint/intellij/sharing/SonarLintSharedFolderUtils.kt @@ -62,7 +62,7 @@ class SonarLintSharedFolderUtils { getService( module.project, SonarLintConsole::class.java - ).debug("Several candidate Vcs repositories detected for module $module, choosing first") + ).debug("Several candidate VCS repositories detected for module $module, choosing first") } repositories.first() }.toSet().firstOrNull()?.getGitDir() diff --git a/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt b/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt index cee82f4bfa..7b73336c6a 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt +++ b/src/main/java/org/sonarlint/intellij/tasks/ConnectionTestTask.kt @@ -30,7 +30,7 @@ import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.validate.V class ConnectionTestTask(private val server: ServerConnection) : Task.WithResult( - null, "Test Connection to " + if (server.isSonarCloud) "SonarCloud" else "SonarQube", true + null, "Test Connection to " + if (server.isSonarCloud) "SonarQube Cloud" else "SonarQube Server", true ) { override fun compute(indicator: ProgressIndicator): ValidateConnectionResponse? { diff --git a/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt b/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt index 316a297770..ec706d2d34 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt +++ b/src/main/java/org/sonarlint/intellij/tasks/FutureAwaitingTask.kt @@ -46,11 +46,11 @@ open class FutureAwaitingTask( } return try { future.get(100, TimeUnit.MILLISECONDS) - } catch (t: TimeoutException) { + } catch (_: TimeoutException) { continue - } catch (e: InterruptedException) { + } catch (_: InterruptedException) { throw InterruptedException("Interrupted") - } catch (e: CancellationException) { + } catch (_: CancellationException) { throw InterruptedException("Operation cancelled") } catch (e: ExecutionException) { throw e.cause ?: e diff --git a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java index 49a99b9b21..2cf90af359 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java +++ b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationTask.java @@ -39,7 +39,7 @@ public class GetOrganizationTask extends Task.Modal { private OrganizationDto organization; public GetOrganizationTask(ServerConnection server, String organizationKey) { - super(null, "Fetch Organization From SonarCloud", true); + super(null, "Fetch Organization From SonarQube Cloud", true); this.server = server; this.organizationKey = organizationKey; } diff --git a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java index cccffb0646..702fec747e 100644 --- a/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java +++ b/src/main/java/org/sonarlint/intellij/tasks/GetOrganizationsTask.java @@ -41,7 +41,7 @@ public class GetOrganizationsTask extends Task.Modal { private List organizations; public GetOrganizationsTask(ServerConnection connection) { - super(null, "Fetch Organizations from SonarCloud", true); + super(null, "Fetch Organizations from SonarQube Cloud", true); this.connection = connection; } diff --git a/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java b/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java index 96eaca4d61..9b25faa75a 100644 --- a/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java +++ b/src/main/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandler.java @@ -84,7 +84,7 @@ public SonarLintCheckinHandler(Project project, CheckinProjectPanel checkinPanel @Override @Nullable public RefreshableOnComponent getBeforeCheckinConfigurationPanel() { - this.checkBox = new NonFocusableCheckBox("Perform SonarLint analysis"); + this.checkBox = new NonFocusableCheckBox("Perform SonarQube for IntelliJ analysis"); return new MyRefreshableOnComponent(checkBox); } @@ -103,7 +103,7 @@ public ReturnResult beforeCheckin(@Nullable CommitExecutor executor, PairConsume return ReturnResult.CANCEL; } - new Task.Modal(project, "Waiting for SonarLint Analysis", true) { + new Task.Modal(project, "Waiting for SonarQube for IntelliJ Analysis", true) { public void run(@NotNull final ProgressIndicator progressIndicator) { new Timer().scheduleAtFixedRate(new TimerTask() { @Override @@ -129,7 +129,7 @@ public void run() { } private void handleError(Exception e, int numFiles) { - var msg = "SonarLint - Error analysing " + numFiles + " changed file(s)."; + var msg = "SonarQube for IntelliJ - Error analysing " + numFiles + " changed file(s)."; if (e.getMessage() != null) { msg = msg + ": " + e.getMessage(); } @@ -211,15 +211,15 @@ private static String createMessage(long filesAnalyzed, long numIssues, long num warningAboutLeakedSecrets = String.format(""" - SonarLint analysis found %d %s. Committed secrets may lead to unauthorized system access.""", numSecretsIssues, secretWord); + SonarQube for IntelliJ analysis found %d %s. Committed secrets may lead to unauthorized system access.""", numSecretsIssues, secretWord); } var message = new StringBuilder(); if (numBlockerIssues > 0) { var blocker = SonarLintUtils.pluralize("issue", numBlockerIssues); - message.append(String.format("SonarLint analysis on %d %s found %d %s (including %d blocker %s)", filesAnalyzed, files, + message.append(String.format("SonarQube for IntelliJ analysis on %d %s found %d %s (including %d blocker %s)", filesAnalyzed, files, numIssues, issues, numBlockerIssues, blocker)); } else { - message.append(String.format("SonarLint analysis on %d %s found %d %s", filesAnalyzed, files, numIssues, issues)); + message.append(String.format("SonarQube for IntelliJ analysis on %d %s found %d %s", filesAnalyzed, files, numIssues, issues)); } message.append(warningAboutLeakedSecrets); return message.toString(); @@ -228,7 +228,7 @@ private static String createMessage(long filesAnalyzed, long numIssues, long num private ReturnResult showYesNoCancel(String resultStr) { final var answer = Messages.showYesNoCancelDialog(project, resultStr, - "SonarLint Analysis Results", + "SonarQube for IntelliJ Analysis Results", "&Review Issues", "C&ontinue", "Cancel", @@ -264,7 +264,7 @@ public JComponent getComponent() { panel.add(checkBox); var dumb = DumbService.isDumb(project); checkBox.setEnabled(!dumb); - checkBox.setToolTipText(dumb ? "SonarLint analysis is impossible until indices are up-to-date" : ""); + checkBox.setToolTipText(dumb ? "SonarQube for IntelliJ analysis is impossible until indices are up-to-date" : ""); return panel; } diff --git a/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java b/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java index 33560970e9..503f3f1a76 100644 --- a/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/AbstractIssuesPanel.java @@ -56,7 +56,7 @@ import static org.sonarlint.intellij.util.ThreadUtilsKt.runOnPooledThread; public abstract class AbstractIssuesPanel extends SimpleToolWindowPanel implements Disposable { - private static final String ID = "SonarLint"; + private static final String ID = "SonarQube for IntelliJ"; protected final Project project; protected Tree tree; protected Tree oldTree; @@ -204,7 +204,7 @@ public void updateOnSelect(@Nullable LiveFinding issue, Show } else { if (showFinding.getCodeSnippet() == null) { SonarLintProjectNotifications.Companion.get(project) - .notifyUnableToOpenFinding("issue", "The issue could not be detected by SonarLint in the current code."); + .notifyUnableToOpenFinding("issue", "The issue could not be detected by SonarQube for IntelliJ in the current code."); return; } runOnPooledThread(project, () -> { @@ -212,7 +212,7 @@ public void updateOnSelect(@Nullable LiveFinding issue, Show var rangeMarker = computeReadActionSafely(project, () -> matcher.matchWithCode(showFinding.getFile(), showFinding.getTextRange(), showFinding.getCodeSnippet())); if (rangeMarker == null) { SonarLintProjectNotifications.Companion.get(project) - .notifyUnableToOpenFinding("issue", "The issue could not be detected by SonarLint in the current code."); + .notifyUnableToOpenFinding("issue", "The issue could not be detected by SonarQube for IntelliJ in the current code."); return; } diff --git a/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java b/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java index 366f77dad1..49915e9602 100644 --- a/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/AutoTriggerStatusPanel.java @@ -60,7 +60,7 @@ public class AutoTriggerStatusPanel { private static final String POWER_SAVE_MODE_ENABLED = "POWER_SAVE_MODE_ENABLED"; private static final String AUTO_TRIGGER_DISABLED = "AUTO_TRIGGER_DISABLED"; - private static final String TOOLTIP = "Some files are not automatically analyzed. Check the SonarLint debug logs for details."; + private static final String TOOLTIP = "Some files are not automatically analyzed. Check the SonarQube for IntelliJ debug logs for details."; private static final String POWER_SAVE_MODE_TOOLTIP = "Disable power save mode for automatic analysis"; diff --git a/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java b/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java index 10164b5c1f..308ddb32fd 100644 --- a/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/CurrentFileConnectedModePanel.java @@ -109,7 +109,7 @@ private NotConnectedCard() { super(SonarLintIcons.NOT_CONNECTED); var notConnectedTooltip = new TooltipWithClickableLinks.ForBrowser(this, "

Not Connected

" + - "

Click to synchronize your project with SonarCloud or SonarQube.

" + + "

Click to synchronize your project with SonarQube (Server, Cloud).

" + "

Learn More

"); IdeTooltipManager.getInstance().setCustomTooltip(this, notConnectedTooltip); } @@ -120,7 +120,7 @@ private ErrorCard() { super(SonarLintIcons.CONNECTION_ERROR); var errorTooltip = new TooltipWithClickableLinks(this, "

Connected Mode Error

" + - "

There was an issue, please check for additional details in the SonarLint Log.

" + + "

There was an issue, please check for additional details in the SonarQube for IntelliJ Log.

" + "

Open Log

", new HyperlinkAdapter() { @Override diff --git a/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java b/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java index c994a7ed05..9d51838e70 100644 --- a/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/CurrentFilePanel.java @@ -67,7 +67,7 @@ public class CurrentFilePanel extends AbstractIssuesPanel { - public static final String SONARLINT_TOOLWINDOW_ID = "SonarLint"; + public static final String SONARLINT_TOOLWINDOW_ID = "SonarQube for IntelliJ"; private static final String SPLIT_PROPORTION_PROPERTY = "SONARLINT_ISSUES_SPLIT_PROPORTION"; private final JBPanelWithEmptyText issuesPanel; private final JScrollPane treeScrollPane; @@ -136,7 +136,7 @@ public void update(@Nullable VirtualFile file, @Nullable Collection i var backendIsAlive = getService(BackendService.class).isAlive(); if (!backendIsAlive) { statusText.setText(SONARLINT_ERROR_MSG); - statusText.appendLine("Restart SonarLint Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, + statusText.appendLine("Restart SonarQube for IntelliJ Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, ignore -> ActionUtil.invokeAction(restartSonarLintAction, this, CurrentFilePanel.SONARLINT_TOOLWINDOW_ID, null, null)); disableEmptyDisplay(false); populateSubTree(tree, treeBuilder, Map.of()); @@ -160,7 +160,7 @@ public void update(@Nullable VirtualFile file, @Nullable Collection i ignore -> ActionUtil.invokeAction(analyzeCurrentFileAction, this, CurrentFilePanel.SONARLINT_TOOLWINDOW_ID, null, null)); } } else { - statusText.setText("Waiting for SonarLint to be ready"); + statusText.setText("Waiting for SonarQube for IntelliJ to be ready"); } issues = Collections.emptyList(); diff --git a/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java b/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java index ff16d02568..3b21a18b9e 100644 --- a/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/CurrentFileStatusPanel.java @@ -34,7 +34,7 @@ public class CurrentFileStatusPanel extends JBPanel { private final Project project; - public static final String HELP_TEXT = "SonarLint analyzes in real-time the active file only, and reports any issues found in this view. "; + public static final String HELP_TEXT = "SonarQube for IntelliJ analyzes in real-time the active file only, and reports any issues found in this view. "; CurrentFileStatusPanel(Project project) { super(new BorderLayout()); diff --git a/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java b/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java index 94e3f80f86..c421b51e17 100644 --- a/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/ReportPanel.java @@ -76,7 +76,7 @@ public class ReportPanel extends SimpleToolWindowPanel implements Disposable { private static final String SPLIT_PROPORTION_PROPERTY = "SONARLINT_ANALYSIS_RESULTS_SPLIT_PROPORTION"; - private static final String ID = "SonarLint"; + private static final String ID = "SonarQube for IntelliJ"; protected final Project project; private final LastAnalysisPanel lastAnalysisPanel; private final ReportTabStatusPanel whatsNewPanel; @@ -211,7 +211,7 @@ private void handleEmptyView() { var backendIsAlive = getService(BackendService.class).isAlive(); if (!backendIsAlive) { statusText.setText(SONARLINT_ERROR_MSG); - statusText.appendLine("Restart SonarLint Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, + statusText.appendLine("Restart SonarQube for IntelliJ Service", SimpleTextAttributes.LINK_PLAIN_ATTRIBUTES, ignore -> ActionUtil.invokeAction(restartSonarLintAction, this, CurrentFilePanel.SONARLINT_TOOLWINDOW_ID, null, null)); } else { var sonarLintActions = SonarLintActions.getInstance(); diff --git a/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java b/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java index 8e5b89dcfa..d96689babd 100644 --- a/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/SecurityHotspotsPanel.java @@ -128,7 +128,7 @@ private void initPanel() { sonarConfigureProject = new SonarConfigureProject(); notSupportedPanel = centeredLabel("Security Hotspots are currently not supported", "Configure Binding", sonarConfigureProject); - cardPanel.add(centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarLint Service", new RestartBackendAction()), SONARLINT_ERROR_CARD_ID); + cardPanel.add(centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarQube for IntelliJ Service", new RestartBackendAction()), SONARLINT_ERROR_CARD_ID); cardPanel.add(notSupportedPanel, NOT_SUPPORTED_CARD_ID); cardPanel.add(centeredLabel("No Security Hotspots found for currently opened files in the latest analysis", null, null), NO_SECURITY_HOTSPOT_CARD_ID); cardPanel.add(centeredLabel("No Security Hotspots shown due to the current filtering", null, null), NO_SECURITY_HOTSPOT_FILTERED_CARD_ID); @@ -145,7 +145,7 @@ private static DefaultActionGroup createActionGroup() { actionGroup.add(sonarLintActions.filterSecurityHotspots()); actionGroup.add(sonarLintActions.includeResolvedHotspotAction()); actionGroup.add(sonarLintActions.configure()); - actionGroup.add(new OpenInBrowserAction("Learn More", "Learn more about Security Hotspots in SonarLint", SECURITY_HOTSPOTS_LINK, AllIcons.Actions.Help)); + actionGroup.add(new OpenInBrowserAction("Learn More", "Learn more about Security Hotspots in SonarQube for IntelliJ", SECURITY_HOTSPOTS_LINK, AllIcons.Actions.Help)); return actionGroup; } diff --git a/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java b/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java index 0289547364..249e824062 100644 --- a/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java +++ b/src/main/java/org/sonarlint/intellij/ui/SonarLintLogPanel.java @@ -27,7 +27,6 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.SimpleToolWindowPanel; import com.intellij.openapi.wm.ToolWindow; -import com.intellij.openapi.wm.ex.ToolWindowEx; import javax.swing.Box; import org.sonarlint.intellij.actions.ToolWindowLogAnalysisAction; import org.sonarlint.intellij.actions.ToolWindowVerboseModeAction; @@ -39,7 +38,7 @@ import static org.sonarlint.intellij.ui.UiUtils.runOnUiThread; public class SonarLintLogPanel extends SimpleToolWindowPanel { - private static final String ID = "SonarLint"; + private static final String ID = "SonarQube for IntelliJ"; private final ToolWindow toolWindow; private final Project project; @@ -82,7 +81,7 @@ private void addLogActions() { var group = new DefaultActionGroup(); group.add(new ToolWindowLogAnalysisAction()); group.add(new ToolWindowVerboseModeAction()); - ((ToolWindowEx) toolWindow).setAdditionalGearActions(group); + toolWindow.setAdditionalGearActions(group); } private void addConsole() { diff --git a/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java b/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java index ec39b31f61..5eec9467b7 100644 --- a/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java +++ b/src/main/java/org/sonarlint/intellij/ui/SonarLintToolWindowFactory.java @@ -46,7 +46,7 @@ * Nothing can be injected as it runs in the root pico container. */ public class SonarLintToolWindowFactory implements ToolWindowFactory { - public static final String TOOL_WINDOW_ID = "SonarLint"; + public static final String TOOL_WINDOW_ID = "SonarQube for IntelliJ"; public static final String LOG_TAB_TITLE = "Log"; public static final String CURRENT_FILE_TAB_TITLE = "Current File"; public static final String REPORT_TAB_TITLE = "Report"; diff --git a/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt b/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt index 8257f58cc2..008cce4e9a 100644 --- a/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt +++ b/src/main/java/org/sonarlint/intellij/ui/inlay/FixSuggestionInlayPanel.kt @@ -145,7 +145,7 @@ class FixSuggestionInlayPanel( border = JBUI.Borders.empty(5) add( JBLabel( - "SonarLint Fix Suggestion (fix ${suggestion.snippetIndex}/${suggestion.totalSnippets})", + "SonarQube for IntelliJ Fix Suggestion (fix ${suggestion.snippetIndex}/${suggestion.totalSnippets})", SonarLintIcons.SONARLINT, SwingConstants.LEFT ), BorderLayout.WEST ) diff --git a/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt b/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt index ada1959221..e636f91624 100644 --- a/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt +++ b/src/main/java/org/sonarlint/intellij/ui/traffic/light/SonarLintDashboardPanel.kt @@ -204,7 +204,7 @@ class SonarLintDashboardPanel(private val editor: Editor) { val gc = GridBag().nextLine() val constrains = gc.next() - val noAccessLabel = HyperlinkLabel("Restart SonarLint Service").apply { + val noAccessLabel = HyperlinkLabel("Restart SonarQube for IntelliJ Service").apply { addHyperlinkListener(object : HyperlinkAdapter() { override fun hyperlinkActivated(e: HyperlinkEvent) { getService(BackendService::class.java).restartBackendService() diff --git a/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt b/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt index c1384a1079..e516d5469a 100644 --- a/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt +++ b/src/main/java/org/sonarlint/intellij/ui/vulnerabilities/TaintVulnerabilitiesPanel.kt @@ -117,10 +117,13 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow init { val globalSettings = getGlobalSettings() cards.add( - centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarLint Service", RestartBackendAction()), + centeredLabel(SONARLINT_ERROR_MSG, "Restart SonarQube for IntelliJ Service", RestartBackendAction()), ERROR_CARD_ID ) - cards.add(centeredLabel("The project is not bound to SonarCloud/SonarQube", "Configure Binding", SonarConfigureProject()), NO_BINDING_CARD_ID) + cards.add( + centeredLabel("The project is not bound to SonarQube (Server, Cloud)", "Configure Binding", SonarConfigureProject()), + NO_BINDING_CARD_ID + ) cards.add(centeredLabel("The project binding is invalid", "Edit Binding", SonarConfigureProject()), INVALID_BINDING_CARD_ID) cards.add(centeredLabel("No taint vulnerabilities shown due to the current filtering", "Show Resolved Taint Vulnerabilities", SonarLintActions.getInstance().includeResolvedTaintVulnerabilitiesAction()), NO_FILTERED_TAINT_VULNERABILITIES_CARD_ID) @@ -151,7 +154,12 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow RefreshTaintVulnerabilitiesAction(), sonarLintActions.includeResolvedTaintVulnerabilitiesAction(), sonarLintActions.configure(), - OpenInBrowserAction(LEARN_MORE, "Learn more about taint vulnerabilities in SonarLint", TAINT_VULNERABILITIES_LINK, AllIcons.Actions.Help) + OpenInBrowserAction( + LEARN_MORE, + "Learn more about taint vulnerabilities in SonarQube for IntelliJ", + TAINT_VULNERABILITIES_LINK, + AllIcons.Actions.Help + ) )) applyFocusOnNewCodeSettings() } @@ -191,8 +199,14 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow } private fun createDisclaimer(): StripePanel { - val stripePanel = StripePanel("This tab displays taint vulnerabilities detected by SonarCloud or SonarQube. SonarLint does not detect those issues locally.", Information) - stripePanel.addAction(LEARN_MORE, OpenInBrowserAction(LEARN_MORE, "Learn more about taint vulnerabilities in SonarLint", TAINT_VULNERABILITIES_LINK)) + val stripePanel = StripePanel( + "This tab displays taint vulnerabilities detected by SonarQube (Server, Cloud). SonarQube for IntelliJ does not detect those issues locally.", + Information + ) + stripePanel.addAction( + LEARN_MORE, + OpenInBrowserAction(LEARN_MORE, "Learn more about taint vulnerabilities in SonarQube for IntelliJ", TAINT_VULNERABILITIES_LINK) + ) stripePanel.addAction("Dismiss", object : AbstractSonarAction() { override fun actionPerformed(e: AnActionEvent) { stripePanel.isVisible = false @@ -361,7 +375,8 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow if (showFinding.codeSnippet == null) { SonarLintProjectNotifications.get(project) .notifyUnableToOpenFinding("taint vulnerability", - "The taint vulnerability could not be detected by SonarLint in the current code.") + "The taint vulnerability could not be detected by SonarQube for IntelliJ in the current code." + ) return@runOnPooledThread } val matcher = TextRangeMatcher(project) @@ -370,7 +385,10 @@ class TaintVulnerabilitiesPanel(private val project: Project) : SimpleToolWindow } if (rangeMarker == null) { SonarLintProjectNotifications.get(project) - .notifyUnableToOpenFinding("taint vulnerability", "The taint vulnerability could not be detected by SonarLint in the current code.") + .notifyUnableToOpenFinding( + "taint vulnerability", + "The taint vulnerability could not be detected by SonarQube for IntelliJ in the current code." + ) return@runOnPooledThread } diff --git a/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt b/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt index a198562a15..967d33a16b 100644 --- a/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt +++ b/src/main/java/org/sonarlint/intellij/util/HelpLabelUtils.kt @@ -28,8 +28,9 @@ class HelpLabelUtils { fun createHelpTextNotConnected(helpText: String) = ContextHelpLabel.createWithLink(null, helpText + - "SonarCloud complements SonarLint by detecting more across the whole project.", - "Try SonarCloud for free", true) { + "SonarQube Cloud complements SonarQube for IntelliJ by detecting more across the whole project.", + "Try SonarQube Cloud for free", true + ) { LinkTelemetry.SONARCLOUD_SIGNUP_PAGE.browseWithTelemetry() } @@ -40,15 +41,15 @@ class HelpLabelUtils { @JvmStatic fun createCleanAsYouCode() = ContextHelpLabel.create( - "Use connected mode to benefit from an
accurate new code definition based on your SonarQube or SonarCloud settings." + + "Use Connected Mode to benefit from an
accurate new code definition based on your SonarQube (Server, Cloud) settings." + "
" + - "
Without connected mode, any code added or changed in the last 30 days is considered new code." + "
Without Connected Mode, any code added or changed in the last 30 days is considered new code." ) @JvmStatic fun createConnectedMode() = ContextHelpLabel.createWithLink(null, - "Connected Mode links SonarLint with SonarCloud or SonarQube to analyze more languages, detect more issues, and receive notifications about the quality gate status.", + "Connected Mode links SonarQube for IntelliJ with SonarQube (Server, Cloud) to analyze more languages, detect more issues, and receive notifications about the quality gate status.", "Learn more about Connected Mode", true) { LinkTelemetry.CONNECTED_MODE_DOCS.browseWithTelemetry() } diff --git a/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt b/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt index b124812c6a..1e989f4154 100644 --- a/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt +++ b/src/main/java/org/sonarlint/intellij/util/ProgressUtils.kt @@ -40,11 +40,11 @@ object ProgressUtils { } try { return future.get(100, TimeUnit.MILLISECONDS) - } catch (t: TimeoutException) { + } catch (_: TimeoutException) { continue - } catch (e: InterruptedException) { + } catch (_: InterruptedException) { throw ProcessCanceledException() - } catch (e: CancellationException) { + } catch (_: CancellationException) { throw ProcessCanceledException() } catch (e: ExecutionException) { throw e.cause ?: e diff --git a/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java b/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java index fac5579a31..568cd59ec1 100644 --- a/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java +++ b/src/main/java/org/sonarlint/intellij/util/SonarLintActions.java @@ -83,16 +83,16 @@ public SonarLintActions() { "Clear analysis results", SonarLintIcons.CLEAN); clearIssuesAction = new ClearCurrentFileIssuesAction("Clear SonarLint Issues", - "Clear SonarLint issues", + "Clear SonarQube for IntelliJ issues", SonarLintIcons.CLEAN); cleanConsoleAction = new SonarCleanConsoleAction("Clear SonarLint Console", - "Clear SonarLint console", + "Clear SonarQube for IntelliJ console", SonarLintIcons.CLEAN); analyzeAllFilesAction = new SonarAnalyzeAllFilesAction("Analyze All Project Files", - "Run a SonarLint analysis on all project files", + "Run a SonarQube for IntelliJ analysis on all project files", SonarLintIcons.PROJECT); analyzeChangedFilesAction = new SonarAnalyzeChangedFilesAction("Analyze VCS Changed Files", - "Run a SonarLint analysis on VCS changed files", + "Run a SonarQube for IntelliJ analysis on VCS changed files", SonarLintIcons.SCM); filterAction = new FilterSecurityHotspotActionGroup("Filter Security Hotspots", "Filter Security Hotspots", @@ -110,7 +110,7 @@ public SonarLintActions() { SonarLintIcons.RESOLVED, LocalTaintVulnerability.class); analyzeCurrentFileAction = new SonarAnalyzeFilesAction("Analyze Current File", - "Run SonarLint analysis on the current file", + "Run SonarQube for IntelliJ analysis on the current file", SonarLintIcons.PLAY); restartSonarLintAction = new RestartBackendAction(); } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index d991d26826..3b94c816e9 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -21,40 +21,37 @@ --> org.sonarlint.idea - SonarLint + SonarQube for IDE ${project.version} SonarSource

- SonarLint by Sonar is a free IDE extension to find and fix coding issues in real-time, flagging issues as you code, just like a spell-checker. + SonarQube for IntelliJ by Sonar is a free IDE extension to find and fix coding issues in real-time, flagging issues as you code, just like a spell-checker. More than a linter, it also delivers rich contextual guidance to help developers understand why there is an issue, assess the risk and educate them on how to fix it. This helps improve their skills, enhance their productivity, and take ownership of their code, taking linting to a different level.


- When paired with SonarQube or SonarCloud in connected mode, - SonarLint forms a powerful end-to-end code quality platform to enrich the CI/CD pipeline, ensuring any code edits or additions are clean. - In connected mode, your team can share common language rulesets, project analysis settings and more. + When paired with SonarQube Server or SonarQube Cloud in Connected Mode, + SonarQube for IntelliJ forms a powerful end-to-end code quality platform to enrich the CI/CD pipeline, ensuring any code edits or additions are clean. + In Connected Mode, your team can share common language rulesets, project analysis settings and more.


- SonarLint is a powerful open-source tool for developers of all experience and skill levels, empowering them + SonarQube for IntelliJ is a powerful open-source tool for developers of all experience and skill levels, empowering them to deliver Clean Code - code fit for development and production. An essential linting tool for every developer.


- SonarLint integrates with most JetBrains IDEs including - IntelliJ IDEA, CLion, GoLand, WebStorm, PHPStorm, PyCharm, Rider, Android Studio & RubyMine. Supported languages include + SonarQube for IntelliJ integrates with most JetBrains IDEs including + IntelliJ IDEA, CLion, GoLand, WebStorm, PHPStorm, PyCharm, Rider, Aqua, AppCode, Android Studio & RubyMine. Supported languages include C, C++, Java, Go, JavaScript, TypeScript, Python, C#, Kotlin, Ruby, HTML, CSS, PHP & PL/SQL. The full list of supported languages and rules is available in our docs.


-

- Beginning in version 7.5, SonarLint can detect Security Hotspots when in Connected Mode with SonarQube 9.7+, or SonarCloud. -


Get started by checking the Requirements and Installation pages. @@ -202,8 +199,10 @@ - - + + @@ -251,27 +250,27 @@ - - - - - - - - - - - @@ -289,7 +288,8 @@ - + @@ -297,26 +297,27 @@ - + @@ -324,31 +325,31 @@ diff --git a/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt b/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt index 45013aa93d..11ee8d65a1 100644 --- a/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt +++ b/src/test/java/org/sonarlint/intellij/SonarLintIntelliJClientTests.kt @@ -108,7 +108,7 @@ class SonarLintIntelliJClientTests : AbstractSonarLintLightTests() { assertThat(projectNotifications).extracting("title", "content").containsExactly( tuple( - "SonarLint suggestions", "Bind this project to 'projectName' on 'connectionId'?" + "SonarQube for IntelliJ suggestions", "Bind this project to 'projectName' on 'connectionId'?" ) ) } @@ -121,8 +121,8 @@ class SonarLintIntelliJClientTests : AbstractSonarLintLightTests() { assertThat(projectNotifications).extracting("title", "content").containsExactly( tuple( - "SonarLint suggestions", - "Bind this project to SonarCloud or SonarQube?" + "SonarQube for IntelliJ suggestions", + "Bind this project to SonarQube (Server, Cloud)?" ) ) } @@ -142,8 +142,8 @@ class SonarLintIntelliJClientTests : AbstractSonarLintLightTests() { assertThat(projectNotifications).extracting("title", "content").containsExactly( tuple( - "SonarLint suggestions", - "Bind this project to SonarCloud or SonarQube?" + "SonarQube for IntelliJ suggestions", + "Bind this project to SonarQube (Server, Cloud)?" ) ) } diff --git a/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java b/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java index 44eda1c152..73a76839d5 100644 --- a/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java +++ b/src/test/java/org/sonarlint/intellij/analysis/LocalFileExclusionsTests.java @@ -93,7 +93,7 @@ void should_exclude_if_file_excluded_in_project_config() { setProjectLevelExclusions(List.of("GLOB:foo.php")); var nonExcludedFilesByModule = underTest.retainNonExcludedFilesByModules(List.of(file), false, excludeReasons::put); - assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarLint Project Settings"); + assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarQube for IntelliJ Project Settings"); } @Test @@ -113,7 +113,7 @@ void should_exclude_if_file_excluded_in_global_config() { triggerFileExclusions("foo.php"); var nonExcludedFilesByModule = underTest.retainNonExcludedFilesByModules(List.of(file), false, excludeReasons::put); - assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarLint Global Settings"); + assertIsExcluded(file, nonExcludedFilesByModule, "file matches exclusions defined in the SonarQube for IntelliJ Global Settings"); } @Test diff --git a/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java b/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java index 45248c1c91..b77313435c 100644 --- a/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java +++ b/src/test/java/org/sonarlint/intellij/config/SonarLintColorSettingsPageTests.java @@ -38,7 +38,7 @@ void setUp() { void testGetters() { assertThat(colorSettingsPage).isNotNull(); assertThat(colorSettingsPage.getColorDescriptors()).isEmpty(); - assertThat(colorSettingsPage.getDisplayName()).isEqualTo("SonarLint"); + assertThat(colorSettingsPage.getDisplayName()).isEqualTo("SonarQube for IntelliJ"); assertThat(colorSettingsPage.getHighlighter()).isInstanceOf(PlainSyntaxHighlighter.class); } diff --git a/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java b/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java index edefafbb15..f89e532ec5 100644 --- a/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java +++ b/src/test/java/org/sonarlint/intellij/editor/DisableRuleIntentionActionTests.java @@ -45,13 +45,13 @@ void prepare() { @Test void text_should_mention_rule_key() { - assertThat(quickFix.getText()).isEqualTo("SonarLint: Disable rule 'rule'"); + assertThat(quickFix.getText()).isEqualTo("SonarQube for IntelliJ: Disable rule 'rule'"); } @Test void check_getters() { assertThat(quickFix.getIcon(0)).isEqualTo(AllIcons.Actions.Cancel); - assertThat(quickFix.getFamilyName()).isEqualTo("SonarLint disable rule"); + assertThat(quickFix.getFamilyName()).isEqualTo("SonarQube for IntelliJ disable rule"); assertThat(quickFix.startInWriteAction()).isFalse(); } diff --git a/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java b/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java index aa86aaba7c..3eaa04df91 100644 --- a/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java +++ b/src/test/java/org/sonarlint/intellij/errorsubmitter/BlameSonarSourceTests.java @@ -33,20 +33,22 @@ class BlameSonarSourceTests { @Test void testShortDescription() { var url = underTest.getReportWithBodyUrl("a"); - assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH).isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarLint+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=a"); + assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH) + .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarQube+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=a"); } @Test void emptyBodyIfSingleLineTooLong() { var url = underTest.getReportWithBodyUrl(StringUtil.repeat("a", 5000)); - assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH).isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarLint+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body="); + assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH) + .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarQube+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body="); } @Test void truncateOnNewLineIfDescriptionTooLong() { var url = underTest.getReportWithBodyUrl(StringUtil.repeat("1234567\n", 400)); assertThat(url).hasSizeLessThanOrEqualTo(BlameSonarSource.MAX_URI_LENGTH) - .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarLint+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=" + .isEqualTo("https://community.sonarsource.com/new-topic?title=Error+in+SonarQube+for+IntelliJ&category_id=6&tags=sonarlint,intellij&body=" + StringUtil.repeat("1234567%0A", 391) + "1234567"); } diff --git a/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt b/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt index e31d9ce1a7..49364f1750 100644 --- a/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt +++ b/src/test/java/org/sonarlint/intellij/mediumtests/StandaloneModeMediumTests.kt @@ -58,7 +58,7 @@ import org.sonarlint.intellij.util.getDocument import org.sonarsource.sonarlint.plugin.api.module.file.ModuleFileEvent class StandaloneModeMediumTests : AbstractSonarLintLightTests() { - private val diamondQuickFix = "SonarLint: Replace with <>" + private val diamondQuickFix = "SonarQube for IntelliJ: Replace with <>" @BeforeEach fun notifyProjectOpened() { @@ -422,9 +422,9 @@ class StandaloneModeMediumTests : AbstractSonarLintLightTests() { val file = myFixture.configureByFile("src/quick_fixes/overlapping_quick_fixes.input.java") analyze(file.virtualFile) - myFixture.launchAction(myFixture.findSingleIntention("SonarLint: Use \"Arrays.toString(array)\" instead")) + myFixture.launchAction(myFixture.findSingleIntention("SonarQube for IntelliJ: Use \"Arrays.toString(array)\" instead")) myFixture.editor.caretModel.currentCaret.moveToOffset(180) - myFixture.launchAction(myFixture.findSingleIntention("SonarLint: Merge this if statement with the enclosing one")) + myFixture.launchAction(myFixture.findSingleIntention("SonarQube for IntelliJ: Merge this if statement with the enclosing one")) //Their stripTrailingSpaces function don't work myFixture.checkResult(expectedFile.getDocument()!!.text.trim(), true) } diff --git a/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java b/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java index 5c1529eabc..cd48667cc8 100644 --- a/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java +++ b/src/test/java/org/sonarlint/intellij/notifications/AnalysisRequirementNotificationsTests.java @@ -85,7 +85,7 @@ void notifyIfSkippedLanguage_JRE() { AnalysisRequirementNotifications.notifyOnceForSkippedPlugins(getProject(), Language.JAVA, DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_JRE, "11", "1.8"); assertThat(notifications).hasSize(1); - assertThat(notifications.get(0).getContent()).isEqualTo("SonarLint requires Java runtime version 11 or later to analyze Java code. Current version is 1.8."); + assertThat(notifications.get(0).getContent()).isEqualTo("SonarQube for IntelliJ requires Java runtime version 11 or later to analyze Java code. Current version is 1.8."); } @Test @@ -93,9 +93,10 @@ void notifyIfSkippedLanguage_Node() { AnalysisRequirementNotifications.notifyOnceForSkippedPlugins(getProject(), Language.JS, DidSkipLoadingPluginParams.SkipReason.UNSATISFIED_NODE_JS, "8.0", "7.2"); assertThat(notifications).hasSize(1); - assertThat(notifications.get(0).getContent()).isEqualTo("SonarLint requires Node.js runtime version 8.0 or later to analyze JavaScript code. Current version is 7.2.
Please configure the Node.js path in the SonarLint settings."); + assertThat(notifications.get(0).getContent()).isEqualTo( + "SonarQube for IntelliJ requires Node.js runtime version 8.0 or later to analyze JavaScript code. Current version is 7.2.
Please configure the Node.js path in the SonarQube for IntelliJ settings."); assertThat(notifications.get(0).getActions()).hasSize(1); - assertThat(notifications.get(0).getActions().get(0).getTemplatePresentation().getText()).isEqualTo("Open SonarLint Settings"); + assertThat(notifications.get(0).getActions().get(0).getTemplatePresentation().getText()).isEqualTo("Open SonarQube for IntelliJ Settings"); } } diff --git a/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java b/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java index 518f7c06df..d6b6eb2e59 100644 --- a/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java +++ b/src/test/java/org/sonarlint/intellij/trigger/SonarLintCheckinHandlerTests.java @@ -116,7 +116,7 @@ void testIssues() { var result = handler.beforeCheckin(null, null); assertThat(result).isEqualTo(CheckinHandler.ReturnResult.CLOSE_WINDOW); - assertThat(messages).containsExactly("SonarLint analysis on 1 file found 1 issue"); + assertThat(messages).containsExactly("SonarQube for IntelliJ analysis on 1 file found 1 issue"); ArgumentCaptor analysisResultCaptor = ArgumentCaptor.forClass(AnalysisResult.class); verify(toolWindow, timeout(1000)).openReportTab(analysisResultCaptor.capture()); var analysisResult = analysisResultCaptor.getValue(); @@ -148,9 +148,10 @@ void testSecretsIssues() { var result = handler.beforeCheckin(null, null); assertThat(result).isEqualTo(CheckinHandler.ReturnResult.CLOSE_WINDOW); - assertThat(messages).containsExactly("SonarLint analysis on 1 file found 1 issue\n" + - "\n" + - "SonarLint analysis found 1 secret. Committed secrets may lead to unauthorized system access."); + assertThat(messages).containsExactly(""" + SonarQube for IntelliJ analysis on 1 file found 1 issue + + SonarQube for IntelliJ analysis found 1 secret. Committed secrets may lead to unauthorized system access."""); ArgumentCaptor analysisResultCaptor = ArgumentCaptor.forClass(AnalysisResult.class); verify(toolWindow, timeout(1000)).openReportTab(analysisResultCaptor.capture()); var analysisResult = analysisResultCaptor.getValue();