I’m writing, if someone could help me to understand.
I installed SonarQube community edition on my local machine and I see it is not catching issues that my company sonar installation alert for.
For example, squid:S1905 (that on my version is reported as java:S1905) is not catched by the scan I perform locally with:
I don’t have an exact answer, but here are a few clues that could explain differences:
You are not using the same edition of SonarQube.
Developer edition has additional rules related to security for example.
You are not using the same version of SonarQube or version of the java analyzer
We regularly update our product, two different versions could lead to different issues (false positive removed, new issues, …).
You are not executing the same set of rules.
Some rules are not enabled by default.
You are not correctly configuring your project.
A misconfiguration could lead to less precise results, hence potentially fewer issues. If it is the case, logs should warn you about it.
For the example of S1905, this rule is part of the community edition and enabled by default, I would therefore bet on the second or last point.
I’m using community edition in both cases, but different versions.
The rule I’m analyzing is present and active in both versions.
So i was investigating some misconfiguration , but no success.
One more question, please: do I need do set dependency jars in sonar.libraries parameter? My dependencies are managed by maven.
Thanks
Rosa
Note that between 7.9.3 and 8.2, we reworked the whole front-end and many rules of the Java analyzer, if newer versions are not reporting it, I would expect the issue to be a false positive, or at least a corner case.
Still, if you are confident the issue should be detected, that we introduced a regression since 7.9.3, feel free to create another topic with a simple reproducer!