Rules

In the Rules tab you can configure the rules that are taken into account when the static analysis is performed. The rules are displayed as a tree structure in the project properties. Some rules are arranged below organizational nodes.

Rules 1:

Default settings

All rules are enabled by default, with the exception of SA0016, SA0024, SA0073, SA0101, SA0105-SA0107, SA0111-SA0125, SA0133, SA0134, SA0145, SA0147, SA0148, SA0150, SA0162-SA0167 and the "strict" IEC rules.

Configuring the rules

Individual rules can be enabled or disabled via the checkbox for the respective row. Ticking the checkbox for a subnode affects all entries below this node. Ticking the checkbox for the top node affects all list entries. The entries below a node can be collapsed or expanded by clicking on the minus or plus sign to the left of the node name.

The number in brackets after each rule, for example "Unreachable code (1)", is the rule number that is issued if the rule is not observed.

The following three settings are available, which can be accessed by repeated clicking on the checkbox:

Syntax of rule violations in the message window

Each rule has a unique number (shown in parentheses after the rule in the rule configuration view). If a rule violation is detected during the static analysis, the number together with an error or warning description is issued in the message window, based on the following syntax. The abbreviation "SA" stands for "Static Analysis".

Syntax: "SA<rule number>: <rule description>"

Sample for rule number 33 (unused variables): "SA0033: Not used: variable 'bSample'"

Temporary deactivation of rules

Rules that are enabled in this dialog can be temporarily disabled in the project via a pragma. For further information please refer to Pragmas and attributes.

 

Overview and description of the rules

An overview and a detailed description of the rules can be found under Rules - overview and description.