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

Update S4457: FP when func/action is async/await #1404

Closed
Evangelink opened this issue May 15, 2018 · 0 comments · Fixed by #1395
Closed

Update S4457: FP when func/action is async/await #1404

Evangelink opened this issue May 15, 2018 · 0 comments · Fixed by #1395
Assignees
Labels
Type: False Positive Rule IS triggered when it shouldn't be.
Milestone

Comments

@Evangelink
Copy link
Contributor

Description

Rule raises FP when using Func with the async/await pattern.

Repro steps

public Task WithAsyncFunc(string s)
{
    if (s == null)
    {
        throw new ArgumentNullException(nameof(s));
    }

    Func<Task> func = async () => await Task.Delay(0);

    return func();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: False Positive Rule IS triggered when it shouldn't be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant