Open Sayberix opened 2 years ago
Thank you for reporting the issue. Indentation is handled natively by Visual Studio, which CodeMaid invokes as part of its cleanup by default. If you run the Edit->Advanced->Format Document command do you see the same behavior?
I took a look at the code a bit further. I think what's happening is that the first else
and the following if
are effectively an else if
unless you include braces. That's why indentation may not work as you expected.
Yes you are right. Everything works fine with parentheses. Is it possible to extend the possibilities of correct editing without brackets?
I think to do that would mean changing the C# language definition to consider indentation significant, which I do not think Microsoft would be willing to do. I think it would be better to include the braces as the language expects.
OK I understood. Thank you!
Environment
Description
Incorrect indentation
Current behavior
Expected behavior