-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
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
Nested loops without brackets may be not indented #867
Comments
I hadn't seen this before, but it makes sense to me and does keep things consistent with |
I don't think that this is a good idea. The case with using statments is the outlier and will probably be used less and less in the future because of the realtive new |
Thinking about this, it makes sense to go with this route. It's pretty easy to opt out by putting braces around the foreach. Since most IDEs auto add the braces by default, the two loops must be super tightly related for the user to explicitly choose to remove the braces. |
* Reduce indentations for nested loops closes #867 * Keep indention for nested loops of mixed types --------- Co-authored-by: Lasath Fernando <devel@lasath.org>
The same for
await foreach
,while
andfor
loops;The second variant removes one indentation level
and look pretty for me.
Also, CSharpier already use the second variant for
using
statementsand if the same will be done for loops it will be more consistent.
The text was updated successfully, but these errors were encountered: