Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMF-4065 Products rebranding in SonarLint #1221

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
------------
Expand All @@ -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. :-)

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 2 additions & 3 deletions its/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -58,7 +58,6 @@ tasks.downloadRobotServerPlugin {
}

val ijVersion: String by project
val intellijBuildVersion: String by project

intellij {
if (project.hasProperty("ijVersion")) {
Expand Down
2 changes: 1 addition & 1 deletion its/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<name>SonarLint-ITs</name>
<version>1.0</version>
<vendor url="https://sonarsource.com">SonarSource</vendor>
<description>Fake Plugin To Run SonarLint UI tests with multiple flavors</description>
<description>Fake Plugin To Run SonarQube for IntelliJ UI tests with multiple flavors</description>

<idea-version since-build="223.8214.6"/>

Expand Down
6 changes: 3 additions & 3 deletions its/src/test/kotlin/org/sonarlint/intellij/its/BaseUiTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CurrentFileTabTests {
fun verifyCurrentFileShowsCard(expectedClass: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
assertThat(findCard(expectedClass)).isNotNull
}
Expand All @@ -46,11 +46,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) {
Expand Down Expand Up @@ -81,7 +81,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")
}
Expand All @@ -93,7 +93,7 @@ class CurrentFileTabTests {
fun openIssueReviewDialogFromList(issueMessage: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
findText(issueMessage).rightClick()
Expand All @@ -108,7 +108,7 @@ class CurrentFileTabTests {
fun verifyCurrentFileTabContainsMessages(vararg expectedMessages: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
content("CurrentFilePanel") {
Expand All @@ -127,7 +127,7 @@ class CurrentFileTabTests {
fun clickCurrentFileIssue(issueMessage: String) {
with(remoteRobot) {
idea {
toolWindow("SonarLint") {
toolWindow("SonarQube for IntelliJ") {
ensureOpen()
tabTitleContains("Current File") { select() }
content("CurrentFilePanel") {
Expand All @@ -140,11 +140,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) {
Expand All @@ -158,7 +158,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()}") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class OpenInIdeTests {
fun createConnection(token: String) {
with(remoteRobot) {
idea {
dialog("Trust This SonarQube Server?") {
button("Connect to This SonarQube Server").click()
dialog("Trust This SonarQube Server Instance?") {
button("Connect to This SonarQube Server Instance").click()
}
dialog("New Connection: Server Details") {
keyboard { enterText("Orchestrator") }
Expand All @@ -63,9 +63,9 @@ class OpenInIdeTests {
fun acceptNewAutomatedConnection() {
with(remoteRobot) {
idea {
dialog("Trust This SonarQube Server?") {
dialog("Trust This SonarQube Server Instance?") {
jbTextFields()[1].text = "Orchestrator"
buttonContainsText("Connect to This SonarQube").click()
buttonContainsText("Connect to This SonarQube Server Instance").click()
}
}
}
Expand All @@ -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()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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()
}
Expand All @@ -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")
}
Expand All @@ -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") {
Expand All @@ -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") {
Expand All @@ -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) {
Expand All @@ -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()}") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class SharedConfigurationTests {
with(remoteRobot) {
idea {
notificationByActionName("Use configuration").click()
dialog("Connect to This SonarQube Server?") {
dialog("Connect to This SonarQube Server Instance?") {
jBPasswordField().text = token
buttonContainsText("Connect to This SonarQube").click()
buttonContainsText("Connect to This SonarQube Server Instance").click()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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) {
Expand Down
Loading