-
Notifications
You must be signed in to change notification settings - Fork 480
Closed
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzersEnhancementFalse_NegativeNo diagnostic is reported for a problematic caseNo diagnostic is reported for a problematic casegood first issuehelp wantedThe issue is up-for-grabs, and can be claimed by commentingThe issue is up-for-grabs, and can be claimed by commenting
Milestone
Description
Describe the problem you are trying to solve
Currently CA2007 requires ConfigureAwait(bool) to be set on all instances of awaiting a task.
It does not currently catch cases where you have awaited an IAsyncEnumerator in an await foreach loop.
If you write:
await foreach (var x in someIAsyncEnumerator) { }
I'd like to see it suggest:
await foreach (var x in someIAsyncEnumerator.ConfigureAwait(someBool)) { }
Currently: It does not recognize missing ConfigureAwait on IAsyncEnumerators
Describe suggestions on how to achieve the rule
Create a rule similar to CA2007, or modify CA2007 to correctly identify await foreach IAsyncEnumerators
Additional context
Not having this rule lead to having deadlocks in our code, until manually fixed.
AndresAlvarezEstrada
Metadata
Metadata
Assignees
Labels
Area-Microsoft.CodeAnalysis.NetAnalyzersEnhancementFalse_NegativeNo diagnostic is reported for a problematic caseNo diagnostic is reported for a problematic casegood first issuehelp wantedThe issue is up-for-grabs, and can be claimed by commentingThe issue is up-for-grabs, and can be claimed by commenting