Quality Rules and Profiles
This plugin integrates 69 quality checks from Scalastyle and 118 from Scapegoat. 41 of the Scalastyle rules are defined without parameters, and the remaining 28 are rule templates, which allow you to set up custom rules by specifying the parameters yourself. Most of those are already activated for you with default values recommended by Scalastyle. Scapegoat rules don't contain any templates.
sonar-scala creates two rules repositories and four built-in quality profiles:
Scalastyle
, Scapegoat
and a combination of those two Scalastyle+Scapegoat
and Recommended by sonar-scala
. The rules in the quality profiles are almost
all activated, except for those which are broken in the upstream projects and
had to be blacklisted.
To make changes to any of the rules, you can clone the quality profile of your choice and then you should be able to activate or deactivate rules, change rule severity and create more custom rules from the existing templates. Alternatively, you can create your quality profile and activate rules from any of the repositories using SonarQube rule filtering and bulk-change features available on the Rules page.
For more information about Scalastyle and Scapegoat rules, please consult the upstream documentation:
- Scalastyle - https://scalastyle.beautiful-scala.com
- Scapegoat - https://github.com/sksamuel/scapegoat
You can also browse the rules created by sonar-scala in the Rules section on this website, see here for Scalastyle and here for Scapegoat.