dotnet/roslyn

Incorrect smart indent anchor following `do` keyword

Open

#50,063 opened on Dec 18, 2020

View on GitHub
 (11 comments) (1 reaction) (1 assignee)C# (4,257 forks)batch import
Area-IDEBugDeveloper CommunityIDE-Formatterhelp wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

Version Used: 16.8.3

🔗 Originally filed as AB#1259025 🔗 This is also the root cause of AB#1289599 🔗 This is also the root cause of AB#1348257 🔗 This is also the root cause of AB#1469007

Steps to Reproduce:

class Test
{
    void Method()
    {
do$$
    }
}

Press Enter after the do keyword.

Expected Behavior:

class Test
{
    void Method()
    {
do
    $$
    }
}

Actual Behavior:

class Test
{
    void Method()
    {
do
            $$
    }
}

Contributor guide