Reputation: 546
I'm using Eclipse Java EE IDE (Version: Oxygen Release (4.7.0)) with SonarLint (3.2.0) in connected mode (Sonarqube 6.5.0).
Time by time I have the problem that the issues shown in SonarLint views (SonarLint On-The-Fly and SonarLint Report) are not the same than showing in Sonarqube. Interesting thing is that it is not reproducible using complete empty project only creating this single issue
The quality profile I'm using only contains the basic rules coming with Sonarqube (no additonal rules from PMD, Checkstyle or FindBugs)
Rule not part of used quality profile ("Sonar way rules not included") but still shown in SonarLint (i.e. "Java 8's 'Files.exists' should not be used (squid:S3725)
Issue shown in Sonarqube not available in SonarLint (i.e. "Source files should not have any duplicated blocks")
Issue shown in SonarLint not active in quality profile (i.e "'Preconditions' and logging arguments should not require evaluation (squid:S2629)")
Can someone tell me if it is a known issue that there are sometimes deviations between SonarLint and Sonarqube? Because the issue is not reproducible as single problem in sample project, I'm not able to localize the problem.
Updated 21.09.2017 09:28
As you can see in attached screenshots (as example for the deviations) there are differences even project is bind to Sonarqube server
Upvotes: 2
Views: 2789
Reputation: 22804
It sounds like your project is not in Connected Mode. That would explain S3725 being raised - it is part of the Sonar way profile, which is used by default on un-connected projects. It would also explain why you don't see the same issues in SonarLint that you see in SonarQube.
Your missing duplications issue is from one of the Common rules. Those rules are only processed server-side. You won't see issues from them in pull request analysis, SonarLint, or any other context in which an analysis report is not submitted to the server.
Upvotes: 3