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

35 lines
752 B
Plaintext

== Why is this an issue?
Use of the LIKE statement for fields with the same specification that are being used together in the same statements makes the relevance of individual fields more understandable, and gives easy reference information, and makes relationships between those fields more obvious.
=== Noncompliant code example
[source,rpg]
----
D NAME S 20A
D PNAM S 20A
----
=== Compliant solution
[source,rpg]
----
D NAME S 20A
D PNAM S LIKE(NAME)
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Use the LIKE keyword to define this field
endif::env-github,rspecator-view[]