You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the formatter with an 80 col limit on a single line if-block whose condition fits within 80 cols, but predicate does not. For example:
if (foo = "1234567890123456789012345678901234567890") bar = "12345678901234567890";
Notice it formats to:
if (foo = "1234567890123456789012345678901234567890") bar =
"12345678901234567890";
I'd expect it to produce:
if (foo = "1234567890123456789012345678901234567890")
bar = "12345678901234567890";
This issue was originally filed by [email protected]
Run the formatter with an 80 col limit on a single line if-block whose condition fits within 80 cols, but predicate does not. For example:
if (foo = "1234567890123456789012345678901234567890") bar = "12345678901234567890";
Notice it formats to:
if (foo = "1234567890123456789012345678901234567890") bar =
"12345678901234567890";
I'd expect it to produce:
if (foo = "1234567890123456789012345678901234567890")
bar = "12345678901234567890";
Or better yet, add the curlies as specified by https://www.dartlang.org/articles/style-guide/#do-use-curly-braces-for-all-flow-control-structures , thus producing:
if (foo = "1234567890123456789012345678901234567890") {
bar = "12345678901234567890";
}
Note that the formatter does the right thing if the curlies are already present.
The text was updated successfully, but these errors were encountered: