rspec/rules/S2029/rpg/rule.adoc

57 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
Using both ``++SPACEA++`` (space-after) and ``++SPACEB++`` (space-before) in the same printer file can make it difficult to understand how many blank lines will be printed where. Therefore either one command or the other should be used but not both.
=== 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
----
A R REP001 TEXT('Detail line. ')
A SPACEB(1)
A SPACEA(1)
A 2'Additional Details for Student :'
A VAR01 6 36TEXT('Additional Details for +
A Student')
----
=== 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
----
A R REP001 TEXT('Detail line. ')
A SPACEB(1)
A 2'Additional Details for Student :'
A VAR01 6 36TEXT('Additional Details for +
A Student')
A SPACEB(1)
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
There are n SPACEA and m SPACEB commands in this file.
'''
== Comments And Links
(visible only on this page)
=== on 22 Sep 2014, 06:51:00 Ann Campbell wrote:
Note that this rule is actually for DDS, the record-format specification for RPG, rather than for RPG itself.
=== on 12 Oct 2014, 17:59:37 Freddy Mallet wrote:
@Ann, what do you mean by DDS because anyway we're going to analyze only RPG programs ?
=== on 12 Oct 2014, 22:20:44 Ann Campbell wrote:
\[~pierre-yves.nicolas] has said that he needs to analyze DDS eventually to have a full symbol table for RPG since DDS files describe data structures [~freddy.mallet]
endif::env-github,rspecator-view[]