rspec/rules/S907/rpg/rule.adoc

29 lines
663 B
Plaintext
Raw Normal View History

== Why is this an issue?
2021-01-27 13:42:22 +01:00
``++GOTO++`` is an unstructured control flow statement. It makes code less readable and maintainable, and should only be used to branch to defined ``++ENDSR++`` points within the source. For normal loop functions use ``++ITER++`` or ``++LEAVE++`` instead.
2020-06-30 12:50:59 +02:00
=== Noncompliant code example
2020-06-30 12:50:59 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2020-06-30 12:50:59 +02:00
----
C LOOP1 TAG
...
C GOTO LOOP1
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]