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 S2674 FN: Add support for ConfigureAwait #6517

Closed
martin-strecker-sonarsource opened this issue Dec 9, 2022 · 0 comments · Fixed by #6516
Closed

Fix S2674 FN: Add support for ConfigureAwait #6517

martin-strecker-sonarsource opened this issue Dec 9, 2022 · 0 comments · Fixed by #6516
Assignees
Labels
Area: C# C# rules related issues. Type: False Negative Rule is NOT triggered when it should be.
Milestone

Comments

@martin-strecker-sonarsource
Copy link
Contributor

Description

S2674 does not take ConfigureAwait into account.

Repro steps

  await stream.ReadAsync(array, 0, (int)stream.Length);                       // Raises S2674
  await stream.ReadAsync(array, 0, (int)stream.Length).ConfigureAwait(false); // Does not

Expected behavior

Raise S2674 if ReadAsync is configured to continue on the current synchronization context.

Actual behavior

Does not raise.

Known workarounds

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Type: False Negative Rule is NOT triggered when it should be.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants