- 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 @@
-
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();