Chapter 13. Rule profile administration
This chapter covers
- Making your own profile: copy and modify
- Profile inheritance
- Rule editing
- Alerts: knowing when your metrics have crossed the line
- Tracking profile changes
- Administrative miscellany
A lot of things happen during an analysis. Your code is examined for duplications, complexity, and a host of other things. Most important (to this chapter, anyway), it’s measured against a set of rules: a rule profile. Out of the box, you get at least one rule profile for each language SonarQube can analyze. Those default rule sets make great starting points; but as you’ve probably realized by now, they’re not perfect for every situation. In fact, almost every coder has a bone to pick with at least one rule in any given rule set, whether it’s that the severity is wrong, or the rule threshold is too low, or it shouldn’t be in the profile at all.
In this chapter, we’ll show you how to go about fixing that. You can edit the default rule sets, but we’ll explain how to peel off a copy and start customizing it to meet your needs. But it’s not just rule sets that are customizable. You can augment the global description of any rule and make profile-specific notes on rules. You can also edit some rules, and we’ll show you how. We’ll also cover how to check a profile’s change log and how to compare one profile to another.