0
votes

I'm using sonar with jenkins for continues integration and code analysis. I learned that sonar by default includes Checkstyle, FindBugs, JaCoCo, PMD altogether, so we don't need to configure any of the above plugins to a project. But when I check the Quality Profile, there are two profiles named as Sonar way with 113 rules and Sonar way with Findbugs with 516. What does mean by there profiles? Why they have different rules?

And, I have a requirement like, for some project, I need to configure Checkstyle only for another project may be Checkstyle with PMD, etc. Is it possible to do that?

1

1 Answers

2
votes

Sonar works by parsing the output of the external tools like Checkstyle, FindBugs, PMD, etc. In short you don't need to configure the plugins, but you can specify the way Sonar reacts to violations in your code found by the plugins.

With Quality profile you can set the rules for your project and modify them for your needs, e.g. line length by default is 80, but you can extend it for your project to 120 characters. If your coding style doesn't care about line length you can disable the rule.

Two default quality profiles gives you an option to decide to build the project with or without Findbugs, which means that your build will or will not run Findbug tool. Findbug provides wider set of rules, but will slow down your build.

To set a specific rules to specific projects you can check here