Programming Rules Review Options

Top  Previous  Next

 VS   VB6   VBA 

The Programming Rules Review sub-section of the Quality Review section of the Team Options tab allows you create the programming rules to be checked when the Review Quality feature is executed with this review selected:

OptionsProgrammingRulesReview

You can create programming rules to check some characteristic of:

  • A single item (such as a project, file, class, etc.). In this case the programming rule checks that the value of a property meets some condition. For example, a programming rule can check that a ListView control doesn't have the LabelEdit property set to True.
  • A collection of items (for example the collection of projects, the collection of controls of a form, etc.). In turn, for a collection of items a programming rule can check that:
    • The Count property meets some condition. For example, a programming rule can check that method doesn't have more than 5 parameters.
    • The collection contains an item that meets some set of conditions. For example, a programming rule can check that Projects collection contains a project with the some specific name or kind.

To create a new programming rule for an item you use the following window:

ProgrammingRuleForItem

To create a new programming rule for a collection of items you use the following window:

ProgrammingRuleForCollection

In both windows you enter the following properties:

  • Id (optional): an identifier for the programming rule.
  • Description: a brief text describing what the programming rule checks.
  • Item to review: the item or collection of items that is going to be reviewed.
  • What to review: depending on whether the Item to review is a single item or a collection of items, the content of this tab changes.
    • When the item to review is a single item, you use a Condition editor to select a property of the item, an operator and a value or set of values.
    • When the item to review is a collection of items, you can either define a condition for its Count property (with an operator and a numeric value), or a set of conditions collection that at least one item of the collection must satisfy. Each condition is defined using a Condition editor.
  • When to review (optional): you can define conditions (using a When condition editor) for the review to be executed. You can set that all, any or none of the conditions must be met.
  • Explanation: the explanation tab has the Explanation field to describe in great detail what the review does and the How to fix field to explain to the developer how to make the review to pass.

See Also:

Review Quality

Quality Review Options

Condition Editor

When Condition Editor