A quality profile is the place where you define your requirements for the code by configuring a set of rules against which it will be measured. This means finding the rules you want to activate on your profile, and setting the properties (severity and potential rule-specific parameters) you want for those rules in your profile.
Finding rules and managing their profile associations is the purpose of the Rules page.
Note that to be able to configure rules on a quality profile, you must have the Administer Quality Profiles and Gates permission.
Quality profile-oriented search
In the Rules page, the "Quality Profile" criterion allows you to concentrate on managing a specific quality profile. If you come to the rules page from a link in a profile detail, this filter will be pre-selected. Otherwise, you can choose it manually.
When the "Quality Profile" filter is activated/set, other criteria may also be available:
- Activation: this allows to search for rules that are active or not (or either) on the given quality profile. By default, it is set to show rules that are active on the profile you selected.
- Inheritance: it's possible for a quality profile to inherit rules from another profile. If the selected profile has a parent profile, then this criterion is automatically displayed.
Whatever search you're doing on the Rules page, you always have the opportunity to activate the rule you're looking at on a quality profile (assuming you're logged in and have the correct permissions). For instance, let's say that you're browsing all the rules tagged as "bug" and you find that one is not activated in any of your profiles. Once you right-arrow to the rule detail, it's easy to activate the rule at its default severity or the severity of your choice, as well as to set any parameters the rule may have:
Once the rule is activated in a profile, that profile is shown in the rule detail:
Note that you do not necessarily need to do this activation rule by rule. You have the option to bulk activate/deactivate all the rules returned by your search for a single profile:
During a bulk activation:
- Rules are activated with their default severity and default parameters
- If some of the rules are already activated on the selected quality profile, they will just be ignored (same for the deactivation)
- If some of the rules can't be activated (because they are rule templates, manual rules or for a different language), they will just be ignored
- At the end, a short summary of what happened will be displayed. You might see for instance "2 rules activated" for a search result that contained 9 rules: the other 7 were already active or irrelevant.