csharpier
csharpier copied to clipboard
Comment between attributes violates SA1515
Input:
public class C {
[A]
// moves up
[B]
public void A()
{
var z = 1;
// stays here
var y = 2;
}
}
Output:
public class C
{
[A]
// moves up
[B]
public void A()
{
var z = 1;
// stays here
var y = 2;
}
}
Expected behavior: The autoformatting causes the code not to comply with SA1515. According to the docs this rule is not in conflict with the CSharpier format. I expect the output to build without formatting warnings when configured as described.
As far as I can tell this can be resolved in two ways:
- Keep whitespace before comments in all cases (if that's possible).
- Add SA1515 to the to-be-disabled rules
I would favor the second option.