rspec/rules/S1192/cobol/rule.adoc

44 lines
857 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
include::../description.adoc[]
== Noncompliant Code Example
With the default threshold of 3:
2020-06-30 12:47:33 +02:00
----
PROCEDURE DIVISION.
DISPLAY "Firstname: ".
*...
DISPLAY "Firstname: ".
*...
DISPLAY "Firstname: ".
----
== Compliant Solution
----
WORKING-STORAGE SECTION.
01 FIRST-NAME-HEADER PIC X(42) VALUE "Firstname: ".
PROCEDURE DIVISION.
DISPLAY FIRST-NAME-HEADER
*...
DISPLAY FIRST-NAME-HEADER
*...
DISPLAY FIRST-NAME-HEADER
----
== Exceptions
Literals with fewer than 7 characters are ignored.
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
Only duplications located in a ``++PROCEDURE DIVISION++``, not those contained in copybooks are reported.
ifdef::env-github,rspecator-view[]
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]