Skip to content

Commit df7a151

Browse files
committed
Remove unnecessary call to GetSyntaxRootAsync
1 parent 95acc4e commit df7a151

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/SpacingRules/SA1028CodeFixProvider.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ public sealed override FixAllProvider GetFixAllProvider()
3535
}
3636

3737
/// <inheritdoc/>
38-
public override async Task RegisterCodeFixesAsync(CodeFixContext context)
38+
public override Task RegisterCodeFixesAsync(CodeFixContext context)
3939
{
40-
var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
4140
foreach (var diagnostic in context.Diagnostics)
4241
{
4342
context.RegisterCodeFix(
@@ -47,6 +46,8 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context)
4746
nameof(SA1028CodeFixProvider)),
4847
diagnostic);
4948
}
49+
50+
return SpecializedTasks.CompletedTask;
5051
}
5152

5253
/// <summary>

0 commit comments

Comments
 (0)