CRR0038 - The CancellationToken parameter is never used

This analyzer detects asynchronous methods that do not use the passed CancellationToken.

Task<string> DemoMethodAsync(CancellationToken token) {
    DoThings();
    return Task.FromResult("Success");
}

All asynchronous methods should accept the CancellationToken parameter and use it to cancel a task if task cancellation was requested. Refer to the Task Cancellation article for more information.

Task<string> DemoMethodAsync(CancellationToken token) {
    token.ThrowIfCancellationRequested();
    DoThings(token);
    return Task.FromResult("Success");
}