rspec/rules/S1145/description.adoc
Arseniy Zaostrovnykh 7ca29f686f Force linebreaks
2021-02-02 15:02:10 +01:00

11 lines
559 B
Plaintext

``++if++`` statements with conditions that are always false have the effect of making blocks of code non-functional. ``++if++`` statements with conditions that are always true are completely redundant, and make the code less readable.
There are three possible causes for the presence of such code:
* An if statement was changed during debugging and that debug code has been committed.
* Some value was left unset.
* Some logic is not doing what the programmer thought it did.
In any of these cases, unconditional ``++if++`` statements should be removed.