rspec/rules/S1474/cobol/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
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.
2023-05-25 14:18:12 +02:00

47 lines
1.6 KiB
Plaintext

== Why is this an issue?
The worst nightmare of every COBOL maintenance programmer is a program where you have to follow 12 concatenated ``++PERFORM++`` statements before you get to the actual processing. This is considered to be the ``++GOTO++``-less version of spaghetti programming.
This situation can be avoided by having a mainline procedure at the beginning of the procedure division which concentrates all program control, and which reads like a map of the program. This mainline procedure should be free from detailed operations such as moving fields, calculations, I/O operations, and so on.
This rule helps ensure that most program control is concentrated in the mainline procedure (the first one in the program) by preventing the other procedures from having more than a predefined threshold of "PERFORM" statements.
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Refactor this "XXX" [paragraph|section] to limit the number of "PERFORM" statements to {}.
=== Parameters
.max
****
----
10
----
Maximum allowed number of "PERFORM" statements per procedure
****
'''
== Comments And Links
(visible only on this page)
=== relates to: S1286
=== on 28 Jan 2014, 00:32:50 Ann Campbell wrote:
This rule is currently "related to" RSPEC-1286, but should instead be dependent upon it (or rather it's implementation should be dependent on the implentation of RSPEC-1286), since the description of this one needs to reference the as-yet-unassigned(?) key of RSPEC-1286's implementation
endif::env-github,rspecator-view[]