rspec/rules/S1192/cobol/rule.adoc

61 lines
1.1 KiB
Plaintext
Raw Normal View History

== Why is this an issue?
2020-06-30 12:47:33 +02:00
include::../description.adoc[]
=== Noncompliant code example
2020-06-30 12:47:33 +02:00
With the default threshold of 3:
2022-02-04 17:28:24 +01:00
[source,cobol]
2020-06-30 12:47:33 +02:00
----
PROCEDURE DIVISION.
DISPLAY "Firstname: ".
*...
DISPLAY "Firstname: ".
*...
DISPLAY "Firstname: ".
----
=== Compliant solution
2020-06-30 12:47:33 +02:00
2022-02-04 17:28:24 +01:00
[source,cobol]
2020-06-30 12:47:33 +02:00
----
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
2020-06-30 12:47:33 +02:00
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[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
include::../highlighting.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]