Java rule id changes?

Some of our builds have suddenly started failing due to sonar errors, looking at the issues, the id’s of the rules seem to have changed?

For example squid:CallToDeprecatedMethod seems to now be java:S1874? This means previous @SuppressWarnings are now not working.

Have there been any recent changes in this area, or do I need to look elsewhere for the cause?

hello @Roy-Porter,

this is caused by new version of Java analyzer. Sorry for the inconvenience. We are going to release bugfix for this issue. I created ticket here

We released bugfix 6.0.1, you should be able to update the plugin in the marketplace.

Hi @saberduck,

I’m facing a similar problem after upgrading from SonarJava 5.13.1 in SonarQube 6.7.1 LTS to Java Code Quality and Security 6.3 in SonarQube 7.9.3 LTS.

Issues solved for rules such as squid:S2275 or squid:S4502 are open again for rules java:S2275 or java:S4502.

Hello @bgelabert,

Can you confirm that you are using @SuppressWarnings to suppress rules squid:S2275 and squid:S4502?

Hello @Quentin,

In our case, we don’t want to suppress any new violations of the java:S2275 and the java:S4502 rules. The problem we are facing is that issues solved for the squid:S2275 and squid:S4502 rules of the SonarJava 5.13.1 analyzer are raising again after upgrading it to Code Quality and Security 6.3, where the rule ID has changed from squid:* to java:*

SonarQube 7.9.3 LTS Enterprise Edition

I’m asking because the initial post is about issue suppression, so I was not sure to understand the problem.

Since this topic is old, and related to another subject, can I ask you to recreate a new one, with all information that you stated here? Also, it could help if you answer to the following questions:

  • are those two rules the only one impacted?
  • how do you know that they are issue solved raised again, and not new? What do you see in the issue history?

It will also help to not get unnoticed for too long.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.