SonarQube - Combining Sonar way, FindBugs, PMD and Checkstyle without duplicates

schnatterer picture schnatterer · Jan 23, 2015 · Viewed 9.9k times · Source

I'm looking for best practices using SonarQube with the FindBugs, PMD and Checkstyle plugins.

  1. How do the rules in SonarQube's default quality profile "Sonar way" relate to those of the plugins? Are they completely different rules or does the Sonar way contain the most important rules from those plugins?
  2. What is the best way of combining those rule sets? How can I avoid duplicate checks?
  3. Sonar v.3.x contains a "Sonar way with Findbugs" profile. I can't find it in v.4.5.1 - what happened to it?

Answer

Fabrice - SonarSource Team picture Fabrice - SonarSource Team · Jan 23, 2015

The SonarQube Java plugin alone already covers all the Checkstyle and PMD rules - which is why the related plugins are no more bundled in SonarQube. So you can get rid of those plugins and forget the related rules.

Concerning Findbugs, most rules are complementary to the SonarQube Java plugin rules. There's no "Sonar way with Findbugs" profile anymore because that's the convention for all the language plugin to have only a "Sonar way" profile.