提交 bfc9cd99 编写于 作者: M Manish Vasani

Only log information for code fixes that can fix the diagnostics.

上级 95990dc4
......@@ -300,12 +300,12 @@ public async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync(Document
{
cancellationToken.ThrowIfCancellationRequested();
using (RoslynEventSource.LogInformationalBlock(FunctionId.CodeFixes_GetCodeFixesAsync, fixer, cancellationToken))
{
await AppendFixesOrConfigurationsAsync(
document, span, diagnostics, fixAllForInSpan, result, fixer,
hasFix: d => this.GetFixableDiagnosticIds(fixer, extensionManager).Contains(d.Id),
getFixes: dxs =>
{
using (RoslynEventSource.LogInformationalBlock(FunctionId.CodeFixes_GetCodeFixesAsync, fixer, cancellationToken))
{
if (fixAllForInSpan)
{
......@@ -316,9 +316,9 @@ public async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync(Document
{
return GetCodeFixesAsync(document, span, fixer, isBlocking, dxs, cancellationToken);
}
}
},
cancellationToken: cancellationToken).ConfigureAwait(false);
}
// Just need the first result if we are doing fix all in span
if (fixAllForInSpan && result.Any()) return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册