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

46 lines
1.1 KiB
Plaintext

== Why is this an issue?
The use of positional notation to describe the overlapping of one field on another can quickly become confusing, particularly in large, or complicated data structures. Instead, the ``++OVERLAY++`` keyword should be used to make such overlaps more readily identifiable.
=== Noncompliant code example
[source,rpg]
----
D Message DS QUALIFIED
D Id 7
* Noncompliant
D Type 1 3
----
=== Compliant solution
[source,rpg]
----
D Message DS QUALIFIED
D Id 7
D Type 3 OVERLAY(Id)
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace this positional notation with the "OVERLAY" keyword.
'''
== Comments And Links
(visible only on this page)
=== on 2 Apr 2015, 18:54:52 Ann Campbell wrote:
http://www.bmeyers.net/faqs/14-tips/32-rpg-iv-style?start=3
endif::env-github,rspecator-view[]