New Sonar Way Java rules causing build timeouts

I have a copy of the Sonar Way Java quality profile because I need to deactivate certain rules. I last copied it in 12-21. I recently took a new copy, and several of the 16 new rules is causing my sonar analysis to go from a couple of minutes to an hour, causing timeouts.

  • CI/CD: Bitbucket Cloud, repo/project is corporateprofile
  • Language is Java, using gradle sonar plugin: id “org.sonarqube” version “2.7.1”
  • Had to disable the following rules to solve the issue:
  • Calls to methods should not trigger an IllegalArgumentException
  • Collections should not be modified while they are iterated
  • Cast operations should not trigger a ClassCastException
  • Recursion should not be infinite
  • Unsupported methods should not be called on some collection implementations

Hey there.

Take a look at this thread for updates and a workaround (although removing the rules from your Quality Profile also works)