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

36 lines
813 B
Plaintext

== Why is this an issue?
Shared coding conventions allow teams to collaborate effectively. This rule checks that labels are on lines by themselves, which makes them more immediately visible as such.
=== Noncompliant code example
[source,rpg]
----
LBLVAL: IF COND(&ERRFLG = ' ') THEN (DO)
CHGVAR VAR(&MSG) VALUE('Validation Completed')
ENDDO
----
=== Compliant solution
[source,rpg]
----
LBLVAL:
IF COND(&ERRFLG = ' ') THEN (DO)
CHGVAR VAR(&MSG) VALUE('Validation Completed')
ENDDO
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
=== on 29 Sep 2014, 13:29:43 Ann Campbell wrote:
As it turns out, this rule is applicable to CLP, not RPG.
endif::env-github,rspecator-view[]