Is your feature request related to a problem?
Based on the idea in DotNetAnalyzers/AsyncUsageAnalyzers#40 and discussed in #382 (comment), let's use this issue to track the proposal for an analyzer that creates a diagnostic for async methods that do not accept a CancellationToken.
Describe the solution you'd like
This could be a Hidden diagnostic with a code fix that makes adding a CancellationToken parameter easy.
It might also be a more visible Info or Warning diagnostic that activates when no CancellationToken is taken, but only after the async method calls into other code that can take a CancellationToken.
Another idea is to have an analyzer that highlights any calls to async methods where a CancellationToken that is available is not provided, but could be.
Is your feature request related to a problem?
Based on the idea in DotNetAnalyzers/AsyncUsageAnalyzers#40 and discussed in #382 (comment), let's use this issue to track the proposal for an analyzer that creates a diagnostic for async methods that do not accept a CancellationToken.
Describe the solution you'd like
This could be a Hidden diagnostic with a code fix that makes adding a CancellationToken parameter easy.
It might also be a more visible Info or Warning diagnostic that activates when no CancellationToken is taken, but only after the async method calls into other code that can take a
CancellationToken.Another idea is to have an analyzer that highlights any calls to async methods where a CancellationToken that is available is not provided, but could be.