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

33 lines
869 B
Plaintext

== Why is this an issue?
Shared coding conventions allow teams to collaborate effectively. While it is possible to omit the specification letter before a ``++/COPY++`` statement, it is advisable not to do so because including a specification on the line indicates to other developers what type of statements will be added to the program by the copybook. Further, using a specification letter on the line makes it clearer to those who might be skimming the file that the line is not just a comment, but does contain code.
=== Noncompliant code example
[source,rpg]
----
/COPY MBR1
----
=== Compliant solution
[source,rpg]
----
I/COPY MBR1
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Add the missing specification letter to this statement.
endif::env-github,rspecator-view[]