File tree Expand file tree Collapse file tree
StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,11 +25,9 @@ namespace StyleCop.Analyzers.ReadabilityRules
2525 [ Shared ]
2626 internal class SA1106CodeFixProvider : CodeFixProvider
2727 {
28- private static readonly ImmutableArray < string > FixableDiagnostics =
29- ImmutableArray . Create ( SA1106CodeMustNotContainEmptyStatements . DiagnosticId ) ;
30-
3128 /// <inheritdoc/>
32- public override ImmutableArray < string > FixableDiagnosticIds => FixableDiagnostics ;
29+ public override ImmutableArray < string > FixableDiagnosticIds { get ; } =
30+ ImmutableArray . Create ( SA1106CodeMustNotContainEmptyStatements . DiagnosticId ) ;
3331
3432 /// <inheritdoc/>
3533 public override FixAllProvider GetFixAllProvider ( )
@@ -42,11 +40,6 @@ public override Task RegisterCodeFixesAsync(CodeFixContext context)
4240 {
4341 foreach ( var diagnostic in context . Diagnostics )
4442 {
45- if ( ! diagnostic . Id . Equals ( SA1106CodeMustNotContainEmptyStatements . DiagnosticId ) )
46- {
47- continue ;
48- }
49-
5043 context . RegisterCodeFix (
5144 CodeAction . Create (
5245 ReadabilityResources . SA1106CodeFix ,
@@ -62,10 +55,6 @@ private static async Task<Document> GetTransformedDocumentAsync(Document documen
6255 {
6356 var root = await document . GetSyntaxRootAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
6457 var token = root . FindToken ( diagnostic . Location . SourceSpan . Start ) ;
65- if ( token . IsMissingOrDefault ( ) )
66- {
67- return document ;
68- }
6958
7059 if ( ! token . Parent . IsKind ( SyntaxKind . EmptyStatement ) )
7160 {
You can’t perform that action at this time.
0 commit comments