How can I get information about if a rule changed with newer Sonar versions?

Hi there,

In my organisation, we have recently changed to Sonar Enterprise 9.9 and I noticed that, in some projects, some issues have disappeared. E.g.: In our previous Sonar 8.4, the rule java:S1176 returned an issue for the following code. But the newer Sonar 9.9 does not.

    /** {@inheritDoc} */
    default void open(Map conf, TopologyContext context) {
        prepareOperator(conf, context);

I found some info about this rule at Java static code analysis. There is an Exception section that may explain why this is no longer an issue, but it is not clear.

Where can I get information about if a rule has changed in newer versions?

Thanks a lot!

Welcome :slight_smile:

for Java you may track the github repository



Hi Gilbert!

Thanks for the hint. :+1: I reviewed the release notes and found only three mentions of rule S1176. One about documenting the wildcards ([SONARJAVA-3472] - Jira), a NPE ([SONARJAVA-3885] - Jira) and an old one about updating the rule description. :frowning:

In this particular case, I think I can justify that it was a false positive in 8.4 and the new 9.9 fixes that. But I’m finding other differences that I´m struggling to understand. E.g.: Sonar 8.4 finds that the following line is dead code (and it is!)

String plg = "testGetAccumulationTimeout";

And it raises a java:S1481 (Unused local variables should be removed) plus a java:S1854 ( Unused assignments should be removed), which seems correct. And the V9.9 raises only the “unused assignment” and not the “unused variable”. Later on in the same file, there are other similar lines with dead code and V9.9 correctly raises both issues.

If I know that the rule has not changed I could raise a bug. But I would like to discard the option that the rule has been updated/improved.


Welcome to the community!

As Gilbert points out, Jira is a primary reference here. Unfortunately - as you’ve discovered - it’s not always clear and easy to find all the changes to a rule, and that’s especially hard when you’re coming from as far back as you are. Sometimes, we make improvements to underlying mechanisms in the language engine that have impacts that ripple out to many rules, and those “ripple-rules” don’t always get listed in the relevant tickets.

As you look at the changes, I urge you to consider creating new Report False-positive / False-negative... threads when you think the changes go in the wrong direction.