We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider a case were a ternary is too long to fit within the 80/120 line length. Currently, it would try to format as:
var value = conditon ? a : b;
Would it be reasonable to format it over multiple lines instead?
var value = condition ? a : b;
The text was updated successfully, but these errors were encountered:
The conditional expression is not too long to fit into one line, in that example. It fits nicely in the second line.
Sorry, something went wrong.
It is too long to fit in the line it is associated with.
That random line-break to fit the code in the next line is something I avoid everywhere it can happen.
For example instead of:
var value = foo(param);
I write:
final value = foo( value, );
But we have no equivalent for ternaries
I'm going to close this in favor of #1465 which is newer, but has more context about why the new formatter doesn't support it yet.
No branches or pull requests
Consider a case were a ternary is too long to fit within the 80/120 line length.
Currently, it would try to format as:
Would it be reasonable to format it over multiple lines instead?
The text was updated successfully, but these errors were encountered: