rspec/rules/S134/cobol/rule.adoc
2021-01-27 13:42:22 +01:00

19 lines
494 B
Plaintext

Nesting too many control flow statements (such as ``++IF++``, ``++PERFORM++``, ``++EVALUATE++``...) should be avoided as it makes the code complex and therefore difficult to maintain.
== Noncompliant Code Example
With a threshold (maximum allowed control flow statement nesting depth) of 3:
----
IF A = 1
PERFORM
MOVE A TO B
PERFORM
IF B = 1 *> Noncompliant
MOVE "HI" TO S1
END-IF
END-PERFORM
END-PERFORM
END-IF.
----