rspec/rules/S1280/rule.adoc
2020-06-30 17:16:12 +02:00

33 lines
665 B
Plaintext

Paragraphs, sections and statements must be correctly indented for better code readability.
== Noncompliant Code Example
----
IDENTIFICATION DIVISION.
PROGRAM-ID. foo.
PROCEDURE DIVISION.
IF "foo" = "bar" THEN
DISPLAY "foo = bar!" *> Noncompliant
ELSE
DISPLAY "foo <> bar!". *> Noncompliant
END PROGRAM foo.
----
== Compliant Solution
----
IDENTIFICATION DIVISION.
PROGRAM-ID. foo.
PROCEDURE DIVISION.
IF "foo" = "bar" THEN
DISPLAY "foo = bar!"
ELSE
DISPLAY "foo <> bar!".
END PROGRAM foo.
----