About Java rules

Hi all,
I see there are 528 rules for Java in default.
However, the built-in profile Sonar way only contains 366 active rules. image

Why the left 162 rules are inactive ?

Thanks.

Hi,

From @ganncamp on an old topic back when we were still using google groups:

We feel that all the rules we implement are valuable in some situation but to give you the best out-of-the-box experience it is our policy to enable by default only rules that are completely non-controversial. As a trivial example, consider the rules about which line to put your opening curly braces on. If those were on by default, people in shops where a different convention had been agreed on would immediately reject those issues and potentially throw the baby out with the bathwater.

To complete this answer, some rules are relevant only for specific project. For instance, not everyone use the Spring framework, so Spring related rules are not part of the Sonar way profile.

HTH

Benoît

1 Like