rspec/rules/S1728/cobol/rule.adoc

42 lines
949 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Shared coding conventions allow teams to collaborate efficiently. For maximum readability, this rule checks that the levels, names and PICTURE clauses for all items of the same level and which are subordinate to the same item start in the same column.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
01 ZONE1.
03 ZONE2 PIC X(10).
03 ZONE3 PIC X(10). *> Noncompliant; name out of line
03 ZONE4 PIC X(10). *> Noncompliant; level out of line
03 ZONE5 PIC X(10). *> Noncompliant; PIC out of line
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
01 ZONE1.
03 ZONE2 PIC X(10).
03 ZONE3 PIC X(10).
03 ZONE4 PIC X(10).
03 ZONE5 PIC X(10).
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]