Skip to content
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

Simple chained attribute access is split into multiple lines on 0.26 #1043

Closed
Jackenmen opened this issue Nov 26, 2023 · 1 comment
Closed

Comments

@Jackenmen
Copy link

Reproduction:

class X
{
    private void Method()
    {
        Application.Current.Dispatcher.Invoke(() =>
        {
            Console.WriteLine("hi!");
        });
    }
}

On 0.25.0, the above code is already formatted properly.

On 0.26.3, it is transformed into this:

class X
{
    private void Method()
    {
        Application
            .Current
            .Dispatcher
            .Invoke(() =>
            {
                Console.WriteLine("hi!");
            });
    }
}

I believe this was introduced by #967 and while I agree that long chains should be split, this seems a bit too eager.

@belav
Copy link
Owner

belav commented Nov 28, 2023

I'm including these comments in #1010, which is slightly different but around the same formatting changes in 0.26.0

@belav belav closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants