csharpier
csharpier copied to clipboard
String Concatentation (or binary expression) should indent in method invocation
class ClassName
{
void MethodName()
{
var result = await ProcessUtil.RunAsync(
commonTestArgs
+ " --TestCaseFilter:\"Quarantined!=true|Quarantined=false\" ",
environmentVariables: EnvironmentVariables
);
}
}
// should be
class ClassName
{
void MethodName()
{
var result = await ProcessUtil.RunAsync(
commonTestArgs
+ " --TestCaseFilter:\"Quarantined!=true|Quarantined=false\" ",
environmentVariables: EnvironmentVariables
);
}
}
Should we because we don't indent other binary operators such as && or ||?
I think we'd want to indent other binary operators as well. Prettier does this
callMethod(
first____________,
secondWithAdd +
someLongName__________________________________________________________,
thirdWithAnd &&
someLongName__________________________________________________________
);
SwitchExpressions will hopefully be handled by this too
return someValue switch
{
OneMore
=> "someStrings"
+ "moreStrings"
+ "andMoreStrings_________________________________________"
};
// should be
return someValue switch
{
OneMore
=> "someStrings"
+ "moreStrings"
+ "andMoreStrings_________________________________________"
};
// or if possible use an align 2 somehow instead of an indent
return someValue switch
{
OneMore
=> "someStrings"
+ "moreStrings"
+ "andMoreStrings_________________________________________"
};
#37 handled most of this, but if we want the align 2 called out in the above comment, we'll have to do some additional work.