Skip to content

Autoformatting: nested if-else indentation #12315

@vers-one

Description

@vers-one

Version Used: Visual Studio 2015 Update 3

Steps to Reproduce:

  1. Paste the following code:
void Test()
{
    if (1 == 1)
        Test();
    else
        if (2 == 2)
            Test();
        else
            Test();
}

Expected Behavior: autoformatting like in previous versions of Visual Studio (proper indentation of nested if-else blocks).

Actual Behavior: Visual Studio 2015 currently formats it like this:

void Test()
{
    if (1 == 1)
        Test();
    else
        if (2 == 2)
        Test();
    else
        Test();
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions