
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.
262 lines
3.1 KiB
Plaintext
262 lines
3.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
Aligning opening and ending words of statements is critical to keep the code readable, especially when blocks contain nested statements.
|
|
|
|
|
|
For ``++IF++`` statements, this rule also checks the alignment of the ``++ELSE++`` word.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,cobol]
|
|
----
|
|
IF SOME-STATUS = 1
|
|
DISPLAY something
|
|
END-IF. *> Noncompliant
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,cobol]
|
|
----
|
|
IF SOME-STATUS = 1
|
|
DISPLAY something
|
|
END-IF.
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Align "ELSE" with its corresponding "IF" at line 18.
|
|
|
|
Align "END-REWRITE" with its corresponding "REWRITE" at line 37.
|
|
|
|
|
|
=== Parameters
|
|
|
|
.evaluate
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to EVALUATE statements, 'false' otherwise
|
|
****
|
|
.call
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to CALL statements, 'false' otherwise
|
|
****
|
|
.accept
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to ACCEPT statements, 'false' otherwise
|
|
****
|
|
.execDli
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to EXECDLI statements, 'false' otherwise
|
|
****
|
|
.return
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to RETURN statements, 'false' otherwise
|
|
****
|
|
.divide
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to DIVIDE statements, 'false' otherwise
|
|
****
|
|
.xmlParse
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to XMLPARSE statements, 'false' otherwise
|
|
****
|
|
.display
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to DISPLAY statements, 'false' otherwise
|
|
****
|
|
.multiply
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to MULTIPLY statements, 'false' otherwise
|
|
****
|
|
.perform
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to PERFORM statements, 'false' otherwise
|
|
****
|
|
.add
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to ADD statements, 'false' otherwise
|
|
****
|
|
.subtract
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to SUBTRACT statements, 'false' otherwise
|
|
****
|
|
.rewrite
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to REWRITE statements, 'false' otherwise
|
|
****
|
|
.search
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to SEARCH statements, 'false' otherwise
|
|
****
|
|
.start
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to START statements, 'false' otherwise
|
|
****
|
|
.if
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to IF statements, 'false' otherwise
|
|
****
|
|
.string
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to STRING statements, 'false' otherwise
|
|
****
|
|
.delete
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to DELETE statements, 'false' otherwise
|
|
****
|
|
.write
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to WRITE statements, 'false' otherwise
|
|
****
|
|
.read
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to READ statements, 'false' otherwise
|
|
****
|
|
.compute
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to COMPUTE statements, 'false' otherwise
|
|
****
|
|
.unstring
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to UNSTRING statements, 'false' otherwise
|
|
****
|
|
.xmlGenerate
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to XMLGENERATE statements, 'false' otherwise
|
|
****
|
|
.move
|
|
****
|
|
|
|
----
|
|
true
|
|
----
|
|
|
|
'true' to apply the rule to MOVE statements, 'false' otherwise
|
|
****
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|