rspec/rules/S1909/description.adoc

8 lines
596 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
Use of ``++goto++`` can lead to programs that are extremely difficult to comprehend and analyse, and possibly to unspecified behavior.
2020-06-30 12:47:33 +02:00
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
Unfortunately, removing ``++goto++`` from some code can lead to a rewritten version that is even more difficult to understand than the original. Therefore, limited use of ``++goto++`` is sometimes advised.
2020-06-30 12:47:33 +02:00
2021-02-02 15:02:10 +01:00
2021-01-27 13:42:22 +01:00
However, the use of ``++goto++`` to jump into or out of a sub-block of code, such as into the body of a ``++for++`` loop is never acceptable, because it is extremely difficult to understand and will likely yield results other than what is intended.