
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.
49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
Shared coding conventions allow teams to collaborate efficiently. This rule checks that first level data item names match a provided regular expression.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
Given an regular expression of ``++WS-.*++``:
|
|
|
|
[source,cobol]
|
|
----
|
|
WORKING-STORAGE SECTION.
|
|
01 WRONG. > Noncompliant; name doesn't match the pattern "WS-.*"
|
|
02 LINK. > Compliant; this is not first level
|
|
|
|
LINKAGE SECTION.
|
|
01 DFHCOMMAREA PIC X(1500). > Compliant; the data item is defined in the LINKAGE SECTION
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,cobol]
|
|
----
|
|
WORKING-STORAGE SECTION.
|
|
01 WS-LINK.
|
|
02 LINK.
|
|
|
|
LINKAGE SECTION.
|
|
01 DFHCOMMAREA PIC X(1500).
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Parameters
|
|
|
|
.regexPatternString
|
|
****
|
|
|
|
A regular expression to specify the data item naming convention
|
|
****
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|