问题
I'm looking for best practices using SonarQube with the FindBugs, PMD and Checkstyle plugins.
- 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?
- What is the best way of combining those rule sets? How can I avoid duplicate checks?
- 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?
回答1:
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.
来源:https://stackoverflow.com/questions/28108369/sonarqube-combining-sonar-way-findbugs-pmd-and-checkstyle-without-duplicates