rspec/rules/S1620/rpg/rule.adoc

35 lines
752 B
Plaintext
Raw Normal View History

== 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.
2021-04-28 16:49:39 +02:00
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
D NAME S 20A
D PNAM S 20A
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
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[]