rspec/rules/S1632/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

52 lines
1.1 KiB
Plaintext

== Why is this an issue?
Historically ``++/COPY++`` procedures contained all of the specifications required for each procedure, so for example ``++xxxxF /COPY++`` would be used to copy the F lines from another ``++F++`` spec. However, this practice results in code that is difficult to understand and maintain. Instead, the use of ``++/COPY++`` statements should be replaced with explicit declarations.
=== Noncompliant code example
Given the default list of specs, H,F,I,D,C,O:
[source,rpg]
----
F/COPY HRSILERPG,RSX36
----
=== Compliant solution
[source,rpg]
----
FSSINRTP IF E K DISK INFSR(*PSSR)
F*
F* Interest Rates File
F*
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace this ``++/COPY++`` directive with explicitly coded specifications
=== Parameters
.specs
****
----
H,F,I,D,C,O
----
Comma-delimited list of specs in which "/COPY" should not be used
****
endif::env-github,rspecator-view[]