Skip to main content

Pragma: analysis

This pragma is used to deactivate the code rules for individual code lines of a POU so that they are excluded from the static analysis. You deactivate code rules by specifying the rule numbers with a prepended minus sign ("-"). A prepended plus sign ("+") activates the rule. You can specify any number of rules in the pragma.

Insert location: Deactivation: In the implementation part, with {analysis - ...} before the first code line where the code analysis is deactivated. Activation: With {analysis + ...} after the last line of the deactivation. For Rule 164, the pragma can also be inserted in the declaration part before a comment.

Syntax:

Deaktivierung von Regeln:

{analysis -<rule number> ( , -<further rule number> )* }
* : optional none, one or more further rule numbers
Aktivierung von Regeln:

analysis +<rule number> ( , +<further rule number> )* }
* : none, one or more further rule numbers

Example

Rule 24 is deactivated for two lines and then reactivated. As a result, rule 24 is not checked in these lines so that nTest:=DINT#99 is allowed for example.

{analysis -24}
nTest := 99;
iVar := INT#2;
{analysis +24}

Deactivating multiple rules:

{analysis -10, -24, -18}