CRR0030 - Redundant 'await'

This analyzer detects situations in which you can omit the await keyword and avoid the unnecessary delay for an asynchronous code execution. For instance, you can return a Task from a method instead of the task's result if it is a Task type method.

async Task<string> DemoMethodAsync(bool value, CancellationToken token) {
    if (value)
        return await Task.Run(() => "result1", token).ConfigureAwait(false);  // CRR0030
    return await Task.Run(() => "result2", token).ConfigureAwait(false);  // CRR0030
}

Change the code above as follows to avoid this issue:

Task<string> DemoMethodAsync(bool value, CancellationToken token) {
    if (value)
        return Task.Run(() => "result1", token);
    return Task.Run(() => "result2", token);
}