rspec/rules/S121/description.adoc
2023-06-15 11:57:45 +02:00

14 lines
481 B
Plaintext

Control structures are code statements that impact the program's control flow (e.g., if statements, for loops, etc.)
== Why is this an issue?
While not technically incorrect, the omission of curly braces can be misleading and may lead to the introduction of errors during maintenance.
include::{noncompliant}[]
Adding curly braces improves the code readability and its robustness:
include::{compliant}[]
The rule raises an issue when a control structure has no curly braces.