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

42 lines
1.0 KiB
Plaintext

== Why is this an issue?
Using a unique symbolic ``++PLIST++`` name provides a single definition point for the parameters used by any external routine being called. This ensures that the same information is passed every time the external routine is called, reducing the potential for mistakes in operation.
This rule flags non-compliant instances of ``++CALL++`` and ``++CALLB++``.
=== Noncompliant code example
[source,rpg]
----
C CALLB(D) 'XR01'
C PARM WSXR07
C PARM WSFLD1
----
=== Compliant solution
[source,rpg]
----
C P0XR07 PLIST
C PARM WSXR07
C PARM WSFLD1
C CALLB 'XR07' P0XR07
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Create a PLIST for this invocation.
endif::env-github,rspecator-view[]