rehlma / flutter-debuggable-control-flowr1
Keep control flow easy to debug
PublicUse braces and put every control-flow body on a separate line.
Keep control flow easy to debug
Use braces and put every control-flow body on a separate line.
Apply this to if, else if, else, for, and while statements.
Both if (ready) return; and if (ready) { return; } hide a useful breakpoint location.
Write a multiline block instead.
Collection if and for elements are expressions and are outside this rule.
The detector only recognizes statements starting a line and skips a terminal do ... while condition.
Multiline conditions and more complex syntax require formatter/analyzer or review.
Detection scope
This detector recognizes specific textual patterns; it is not a complete semantic analyzer. Explicit user instructions and applicable repository conventions take precedence.