rspec/rules/S1901/rpg/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

70 lines
2.6 KiB
Plaintext

== Why is this an issue?
The ``++/EJECT++`` compiler directive adds a page break when the code is printed, and should be used at the end of each ``++F++``, ``++D++``, and ``++C++`` specification section to make the structure of the code clearer and to enhance overall readability.
=== Noncompliant code example
[source,rpg]
----
F* Conversion Job Activity File (CV)
F*
FCVJBAVP IF E K DISK
F* Conversion Job Dependency File (CZ)
F*
FCVJBDPP IF E K DISK
F*
DP0RTCD S 1
DP0JBNM S 10A
DP0ERMG S 100A
DK0JBNM S LIKE(CVJBNM)
DK1JBNM S LIKE(CVJBNM)
DJST S 10A DIM(10)
DI S 3 0 INZ
C
C EXSR SR999
C
C EXSR SR100
----
=== Compliant solution
[source,rpg]
----
F* Conversion Job Activity File (CV)
F*
FCVJBAVP IF E K DISK
F* Conversion Job Dependency File (CZ)
F*
FCVJBDPP IF E K DISK
F*
F/EJECT
DP0RTCD S 1
DP0JBNM S 10A
DP0ERMG S 100A
DK0JBNM S LIKE(CVJBNM)
DK1JBNM S LIKE(CVJBNM)
DJST S 10A DIM(10)
DI S 3 0 INZ
D/EJECT
C
C EXSR SR999
C
C EXSR SR100
C/EJECT
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Add an "/EJECT" statement at the end of this "X" specification section
endif::env-github,rspecator-view[]