Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix S3168 FN: Async implementation of non-async interfaces #9696

Open
qhris opened this issue Nov 22, 2024 · 0 comments
Open

Fix S3168 FN: Async implementation of non-async interfaces #9696

qhris opened this issue Nov 22, 2024 · 0 comments

Comments

@qhris
Copy link

qhris commented Nov 22, 2024

Description

Async implementations of non-async interface methods are not properly reported as an issue.

Repro steps

Minimal reproduction code:

public interface ITestReproduction
{
    void TestMethod();
}

public class TestReproduction : ITestReproduction
{
    async void TestMethod() // FN: Not reported as an issue.
    {
        await Task.Delay(1000);
    }
}

Expected behavior

The above code should report an issue with the async void implementation of the interface.

Actual behavior

Nothing is reported.

Known workarounds

Nothing.

Related information

  • C# 12
  • .NET 8.0
  • Rider 2024.3 with SonarLint 10.12.0.79769
  • Operating System Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant