2021-01-27 13:42:22 +01:00
|
|
|
Call stacks containing lot of ``++PERFORM++`` statements is a key ingredient for making what's known as "Spaghetti code".
|
2021-02-02 15:02:10 +01:00
|
|
|
|
2020-06-30 12:47:33 +02:00
|
|
|
Such code is hard to read, refactor and therefore maintain.
|
|
|
|
|
2021-02-02 15:02:10 +01:00
|
|
|
|
2020-06-30 12:47:33 +02:00
|
|
|
This rule supports both sections and paragraphs.
|
|
|
|
|
|
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
|
|
|
|
With a threshold of 3:
|
2020-06-30 14:49:38 +02:00
|
|
|
|
2020-06-30 12:47:33 +02:00
|
|
|
----
|
|
|
|
PERFORM FIRST.
|
|
|
|
|
|
|
|
FIRST.
|
|
|
|
PERFORM SECOND.
|
|
|
|
|
|
|
|
SECOND.
|
|
|
|
PERFORM THIRD.
|
|
|
|
|
|
|
|
THIRD.
|
|
|
|
PERFORM FOURTH. *> Noncompliant
|
|
|
|
|
|
|
|
FOURTH.
|
|
|
|
DISPLAY something.
|
|
|
|
----
|
|
|
|
|
|
|
|
|