SA0150: Violations of lower or upper limits of the metrics

Function

Determines function blocks that violate the enabled metrics at the lower or upper limit.

Reason

Code that adheres to certain metrics is easier to read, easier to maintain and easier to test.

Importance

High

PLCopen rule

CP9

Sample:

The metric "Number of calls" is enabled and configured in the metrics configuration enabled (PLC Project Properties > category "Static Analysis" > "Metrics" tab).

When performing the static analysis, a violation of SA0150 is reported as an error or warning in the error list.

// => SA0150: Metric violation for 'Prog1'. Result for metric 'Calls' (5) > 3"