Server is running: Developer Edition v2026.4.1 (126914) deployed via Helm without additional extensions.
We have several Java rules that are detected correctly both in the CI maven runs AND local Eclipse plugins (e.g. S2259) when no project is associated, but are not reported, when a quality profile is associated to the project.
We double checked that the rules in question are activated in the profile and thus should be reported with the active profile / project association as well.
Eclipse Plugin reports a possible NPE (S2259) in this example correctly in both occurrences, when no Sonar project is associated:
When a Sonar project is associated to the Eclipse project the behaviour gets weird. The project itself has no special configuration at all, only the association to a quality profile that inherits the “Sonar way” default Java profile. The behaviour is exactly the same, when the “Sonar way” quality profile is associated to the project directly. The same result is observable in the CI run using the maven plugin.
As can be seen in this example, the detection S2259 is inconsistent, based on unrelated code AFTER the violation. First observable discrepancy is the different error description.
Here the violation is not reported in the first method (getFile()) but in the second on (run()) as opposed to being correctly reported in both above:
Simply removing the useless code AFTER the possible NPE results in the rule being reported:
This leads to false negatives in our analysis where occurrences are simply not reported at all despite them being found by the Eclipse plugin without project association.
Rule S2259 is only ONE example, this applies for a couple of other rules in the same way, where they are reported in some places, but not in others.
Any idea what could provoke such inconsistent behaviour?
We’d be happy, if we could get a reliable and consistent report of findings in our CI runs and Eclipse dev environments!
Cheers




