Sonarlint reporting more issues than Sonarqube server

234 views
Skip to first unread message

ikaus...@gmail.com

unread,
Aug 3, 2017, 11:34:16 AM8/3/17
to SonarLint
Hi

I am using Sonarlint 3.2.0 version on Eclipse Neon.3 Release (4.6.3) with SonarQube 5.6


I bound my project with sonarqube server and sonarlint reports all the issues reported in the server.
The problem is sonarlint also displays additional issues as well which are not shown in sonarqube server.


We are using a custom quality profile but all rules are of squid type (nothing from findbugs or other 3rd party tools)

Here is a sample code

public class XYZ implements ABC{

  @Override
  public void method() throws XYZException {
  // TBD
  }
}


This code generates the following issue in sonarlint

"throws" declarations should not be superfluous (squid:RedundantThrowsDeclarationCheck)

but this is not reported by sonarqube server.


Can you let us know why sonarlint is picking up additional issues?
I am expecting the number of issues should be same as int the server and not more. Isn't that a correct assumption?

Thanks in advance.

Regards
Kaustav

Julien HENRY

unread,
Aug 4, 2017, 3:47:39 AM8/4/17
to ikaus...@gmail.com, SonarLint
Hi Kaustav,

First of all congrats for the very well detailed message, that's not so usual :)

First of all, do you confirm you have activated the rule in your quality profile, and that the issue is relevant here?

If yes, I see two cases:
  - issue is not reported on SonarQube because of a scanner configuration issue. Usually it means the bytecode of XYZException is not available (sonar.java.binaries). Look at scanner logs to see if there is log complaining about that.
  - issue was reported on SonarQube, but marked as false positive/won't fix (you can confirm by enabling the correct filter in the issues space). Then problem is on SonarLint side, because it should also hide the issue.

Please identify the situation you are in, and then we can try to fix the issue.

++


Julien Henry | SonarSource

Developer

http://sonarsource.com


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/6e3f4c45-3756-4a04-8788-693e34356bc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rodolfo Forte

unread,
Aug 4, 2017, 7:54:41 AM8/4/17
to SonarLint, ikaus...@gmail.com
Hello!

You mentioned that you have binded your project to the SonarQube server, but have you binded your project to the specific SonarQube project you want to download the rules from?
The box on SonarQube servers tab that says: "<Type here to start searching for a remote SonarQube project...>"
Reply all
Reply to author
Forward
0 new messages