rspec/rules/S122/cobol/rule.adoc

46 lines
696 B
Plaintext
Raw Normal View History

== Why is this an issue?
2020-06-30 10:16:44 +02:00
include::../description.adoc[]
=== Noncompliant code example
2020-06-30 10:16:44 +02:00
2022-02-04 17:28:24 +01:00
[source,cobol]
2020-06-30 10:16:44 +02:00
----
MOVE '1' TO OCTET-1 MOVE '2' TO OCTET-2
----
=== Compliant solution
2020-06-30 10:16:44 +02:00
2022-02-04 17:28:24 +01:00
[source,cobol]
2020-06-30 10:16:44 +02:00
----
MOVE '1' TO OCTET-1
MOVE '2' TO OCTET-2
----
=== Exceptions
2020-06-30 10:16:44 +02:00
Control flow statements with a single nested statement are ignored.
2021-02-02 15:02:10 +01:00
[source,cobol]
2020-06-30 10:16:44 +02:00
----
IF x > 0 THEN DISPLAY "positive". *> Compliant
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]