Skip to end of metadata
Go to start of metadata

Table of Contents


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 which 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.

Generic search

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 the rule is activated, it appears in the list of the "Quality Profiles" section:

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 or manual rules), 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" whereas the result of the search contained 9 rules: this might be because 7 of them where already activated for instance.

Quality profile-oriented search

In the Rules page, the "Quality Profile" criterion (always on top) allows you to concentrate on managing a specific quality profile instead of looking at any available rule. This criterion can be activated:

  • Manually: in this case, you have to search for the quality profile you want to manage
  • Automatically: when you come from the "Quality Profile" pages, some links will bring you to the Rules page with this criterion automatically set to the quality profile you were browsing

As you can see, when the "Quality Profile" criterion is activated/set, other criteria are also automatically displayed:

  • 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.
  • Language: because a quality profile is mono-language, this criterion is automatically set to the correct language so that rules of any other language are not shown.
  • 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.

 

The "Quality Profile" rule header is used to focus your attention when browsing rules: when your search is profile-specific, a top bar is added on each rule to show its status (activated or not) within the profile, and to provide all the shortcut actions to activate/deactivate/update it on the specified quality profile:

Also, you will notice that the bulk action menu (accessed by clicking on the gears icon at the top right of the list of rules) offers new shortcut entries when your search is qualified by profile to bulk activate/deactivate the rules on the selected quality profile ("Activate in XXX" or "Deactivate in XXX").

  • No labels