roslynator
roslynator copied to clipboard
RCS1031 conflicts with RCS1111
trafficstars
Product and Version Used: Roslynator 2.3.0 Visual Studio 2017, 15.9.19 Steps to Reproduce: Consider a trivial switch-case where sections have multiple statements:
public void TestSwitch(int param)
{
switch (param)
{
case 1:
Console.WriteLine("a");
break;
case 2:
{
Console.WriteLine("b");
break;
}
}
}
Also consider that both RCS1031 and RCS1111 are included into the ruleset. Case 1 will cause RCS1111 requiring to add the braces, but case 2 will cause RCS1031 requiring to remove the braces. Actual Behavior: RCS1031 confilcts with RCS1111 Expected Behavior: RCS1031 and RCS1111 have same opinion about the necessity of braces in this case.
Just hit this issue with version 4.1.1
I think that these diagnostic rules cannot be used both at the same time.