csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

Break long invocation chains if they have more than 4 (3?) invocations in them.

Open belav opened this issue 2 years ago • 4 comments

belav avatar Jan 14 '23 15:01 belav

If we're breaking, we should do before the first invocation so the indentation is more consistent:

e.g.

Enumerable
    .Range(...)
    .Where(...);

shocklateboy92 avatar Jan 18 '23 05:01 shocklateboy92

Agreed, it uses this logic currently. <= 4 keeps on the same line, otherwise you get some weird spacing with the one version

        one.Range______________________________________________()
            .Where__________________________________________________();

        this.Range______________________________________________()
            .Where__________________________________________________();

        Enumerable
            .Range______________________________________________()
            .Where__________________________________________________();

belav avatar Jan 21 '23 18:01 belav

Currently it doesn't break a chain until it exceeds the max line length. image

Powerz avatar Mar 09 '23 14:03 Powerz