rspec/rules/S1471/cobol/rule.adoc
2022-02-04 16:28:24 +00:00

41 lines
835 B
Plaintext

Portability issues may restrict which characters should be used in an identifier.
This rule checks identifier names against a regular expression of disallowed characters. Due to a technical limitation, the COBOL analyzer is not able for the time-being to differentiate lowercase from uppercase characters.
== Noncompliant Code Example
With the default regular expression ``++[^a-zA-Z0-9-]++``:
[source,cobol]
----
MOVE DATA-1 TO DATA_2 *> Noncompliant; '_' not allowed
----
== Compliant Solution
[source,cobol]
----
MOVE DATA-1 TO DATA-2
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]