rspec/rules/S1299/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
655 B
Plaintext

== Why is this an issue?
If the second procedure of a PERFORM THRU is not defined after the first one, the source code is semantically incorrect and the program doesn't behave as expected.
=== Noncompliant code example
[source,cobol]
----
PERFORM SECOND-P THRU FIRST-P.
...
FIRST-P.
...
SECOND-P.
...
----
=== Compliant solution
[source,cobol]
----
PERFORM FIRST-P THRU SECOND-P.
...
FIRST-P.
...
SECOND-P.
...
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
The procedure 'XXXX' must be defined before 'YYYY'.
endif::env-github,rspecator-view[]