Open
Description
interface IInterface
{
void InterfaceMethod();
}
class Base
{
protected virtual void BaseMethod() {}
}
class Sample : Base, IInterface
{
public async void InterfaceMethod() {} // Noncompliant
protected override async void BaseMethod() {} // Noncompliant
protected virtual async void VirtualMethod() {} // Noncompliant
async void OtherMethod() {} // Compliant: covered by S3168
}
This rule complements S3168, which ignores methods that implement an interface, override a base method, or are virtual. Having this functionality as a separate rule allows users to tailor their analysis to their needs.