Our company is currently using SonarQube and SonarLint, and there are some issues that we hope to receive help with. Thank you.
The results of scanning locally using SonarLint do not match those of SonarQue. The specific information is as follows:
- Connection mode has been used and Update local storage has been used
- The scanned project is a Java project, and the quality configuration used is the built-in Sonar Way
- The version information is as follows:
SonarQube version: Community Edition version 9.9
SonarLint version: 22.214.171.124615
IntelliJ IDEA version: IntelliJ IDEA 2022.3.2 (Community Edition)
The screenshot is as follows:
Connection mode has been configured and Update local storage has been executed
Scan the report of all files in the project, with 59 issues
On the Sonarqube platform, there is a problem where the scan result is 242
Can you give some examples of specific issues that aren’t raised in SonarLint, but that are raised by SonarQube?
Also keep in mind this entry in the FAQ.
1.This result is that sonarqube was scanned, but local sonarlint was not scanned
2.This blocker was scanned by sonarlint, but sonarqube did not
Thanks, and sorry for the late update.
I would suggest making sure you are using the latest version of SonarLint for IntelliJ (v8.5.1) – if you still have an issue being raised in SonarQube that isn’t being raised by SonarLint (while using connected mode), I suggest trying to put together a minimal reproducer so that we can try and debug it on our end.
It would also be useful to know what steps you follow when you analyze your code with SonarQube (such as: which scanner are you using? SonarScanner CLI? Maven? Gradle?)
It looks like this rule is related to tests – and will only be turned on if IntelliJ says that it’s a test (for SonarLint) or if SonarQube is told via the
sonar.tests parameter. Which comes back to the question about how you preform your analysis.