Method parameter alignment

Answered

In a method chain the alignment of method parameters on separate line from the method is inconsistent. The first method in the chain is aligned to the calling scope. Subsequent methods are aligned to the '.' of the method. Does some configuration exist to make this alignment consistent?

Observed

foo.Method1(
arg1,
arg2)
.Method2(
arg3,
arg4)
.Method3(
arg5,
arg6);

Desired

foo.Method1(
arg1,
arg2)
.Method2(
arg3,
arg4)
.Method3(
arg5,
arg6);

 

2 comments
Comment actions Permalink
Official comment

Hello Matthew,

I was not able to reproduce the same formatting in R# 2016.2 EAP build https://confluence.jetbrains.com/display/ReSharper/ReSharper+2016.2+EAP. So please install such build and check the issue once again.

Thanks! 

Comment actions Permalink

Thanks Alexander,

I tried with the latest RC and the behavior was corrected.

When testing I observed a similar odd behavior though, a single method call with parameters on multiple lines does not align to the method. This is inconsistent with chained methods.

Observed

foo.Method(
arg1,
arg2);

 Expected

foo.Method(
arg1,
arg2);
0

Please sign in to leave a comment.