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: 8.2.0.68615
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
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.