Closed richardissimo closed 3 months ago
Hmm. My made up example isn't exactly what I had for real, and I can see in that example, the DerivedClass implementation should override. I'll see if I can find a better example, closer to my problem.
No, I'm withdrawing this. This is more like what the actual code looks like, so fair enough, that can be made static.
public abstract class Rule
{
protected string SimplifyWhitespaceExpression(string expression)
{
// Implementation isn't relevant, but it can be made static
}
Description
S2325 Make 'MethodName' a static method. If I have an abstract class with a virtual method, and the derived class has an implementation which could be made static, this should not trigger this rule, because it is overriding the virtual.
Repro steps
Expected behavior
Should not trigger S2325
Actual behavior
triggers S2325
Known workarounds
Suppress rule
Related information