rspec/rules/S2681/description.adoc

10 lines
645 B
Plaintext
Raw Normal View History

Having inconsistent indentation and omitting curly braces from a control structure, such as an `if` statement or `for` loop, is misleading and can induce bugs.
2020-06-30 12:48:07 +02:00
This rule raises an issue when the indentation of the lines after a control structure indicates an intent to include those lines in the block, but the omission of curly braces means the lines will be unconditionally executed once.
2021-02-02 15:02:10 +01:00
The following patterns are recognized:
include::{example}[]
2021-02-02 15:02:10 +01:00
Note that this rule considers tab characters to be equivalent to 1 space. When mixing spaces and tabs, a code may look fine in one editor but be confusing in another configured differently.