Skip to content

Commit 704e326

Browse files
authored
Merge pull request #2557 from sharwell/rm-helper
Remove unnecessary method FixAllContextHelper.GetAllDiagnosticsAsync
2 parents 2007089 + 10efc60 commit 704e326

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/Helpers/FixAllContextHelper.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,6 @@ public static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>
119119
return ImmutableDictionary<Project, ImmutableArray<Diagnostic>>.Empty;
120120
}
121121

122-
public static async Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync(Compilation compilation, CompilationWithAnalyzers compilationWithAnalyzers, ImmutableArray<DiagnosticAnalyzer> analyzers, IEnumerable<Document> documents, bool includeCompilerDiagnostics, CancellationToken cancellationToken)
123-
{
124-
return await compilationWithAnalyzers.GetAllDiagnosticsAsync(cancellationToken).ConfigureAwait(false);
125-
}
126-
127122
/// <summary>
128123
/// Gets all <see cref="Diagnostic"/> instances within a specific <see cref="Project"/> which are relevant to a
129124
/// <see cref="FixAllContext"/>.

StyleCop.Analyzers/StyleCopTester/Program.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ namespace StyleCopTester
1919
using Microsoft.CodeAnalysis.CodeFixes;
2020
using Microsoft.CodeAnalysis.Diagnostics;
2121
using Microsoft.CodeAnalysis.MSBuild;
22-
using Microsoft.CodeAnalysis.Text;
23-
using StyleCop.Analyzers.Helpers;
2422
using File = System.IO.File;
2523
using Path = System.IO.Path;
2624

@@ -482,7 +480,7 @@ private static async Task<ImmutableArray<Diagnostic>> GetProjectAnalyzerDiagnost
482480
Compilation compilation = await processedProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
483481
CompilationWithAnalyzers compilationWithAnalyzers = compilation.WithAnalyzers(analyzers, new CompilationWithAnalyzersOptions(new AnalyzerOptions(ImmutableArray.Create<AdditionalText>()), null, true, false));
484482

485-
var diagnostics = await FixAllContextHelper.GetAllDiagnosticsAsync(compilation, compilationWithAnalyzers, analyzers, project.Documents, true, cancellationToken).ConfigureAwait(false);
483+
var diagnostics = await compilationWithAnalyzers.GetAllDiagnosticsAsync(cancellationToken).ConfigureAwait(false);
486484
return diagnostics;
487485
}
488486

0 commit comments

Comments
 (0)