SonarCloud detects more critical bugs in your Java code

Hello SonarCloud :sonarcloud: Users,

We have released 5 new rules that detect critical bugs possibly leading to crashes in your Java application:

  • S6416: Calls to methods should not trigger an IllegalArgumentException
  • S6320: Cast operations should not trigger a ClassCastException
  • S6417: Collections should not be modified while they are iterated
  • S2190: Recursion should not be infinite
  • S6322: Unsupported methods should not be called on some collection implementations

Those rules are using a new technology for advanced bug detection that we are releasing for the first time. Even more than for other rules, we are looking for feedback on the results.

These new rules may impact the overall performance of your analysis in some cases. You may want to turn them off by setting the sonar.internal.analysis.dbd parameter to false.

Best

5 Likes

Will these be coming to SonarQube as well?

Yes, these rules detecting tricky bugs will be part of SonarQube, most probably for version 9.6. We are also working to provide the same for Python.

Actually, they will be part of SonarQube Developer Edition 9.5 (mid-June).