
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
65 lines
907 B
Plaintext
65 lines
907 B
Plaintext
== Why is this an issue?
|
|
|
|
Call stacks containing lot of ``++PERFORM++`` statements is a key ingredient for making what's known as "Spaghetti code".
|
|
|
|
Such code is hard to read, refactor and therefore maintain.
|
|
|
|
|
|
This rule supports both sections and paragraphs.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
With a threshold of 3:
|
|
|
|
[source,cobol]
|
|
----
|
|
PERFORM FIRST.
|
|
|
|
FIRST.
|
|
PERFORM SECOND.
|
|
|
|
SECOND.
|
|
PERFORM THIRD.
|
|
|
|
THIRD.
|
|
PERFORM FOURTH. *> Noncompliant
|
|
|
|
FOURTH.
|
|
DISPLAY something.
|
|
----
|
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
This module can trigger long chain of up to 6 PERFORMs, for example using the ones at line: 123 -> 23 -> 54 -> ...
|
|
|
|
|
|
=== Parameters
|
|
|
|
.max
|
|
****
|
|
|
|
----
|
|
5
|
|
----
|
|
|
|
Maximum allowed call stack
|
|
****
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== is related to: S1684
|
|
|
|
endif::env-github,rspecator-view[]
|