File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
tools-local/Microsoft.ML.InternalCodeAnalyzer Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ public sealed class NameFixProvider : CodeFixProvider
3434 private static ImmutableArray < string > _fixable = ImmutableArray . Create (
3535 NameAnalyzer . PrivateFieldName . Id , NameAnalyzer . GeneralName . Id ,
3636 ParameterVariableNameAnalyzer . Id , TypeParamNameAnalyzer . Id ) ;
37- private static readonly ImmutableHashSet < string > _fixableSet = ImmutableHashSet < string > . Empty . Union ( _fixable ) ;
3837
3938 private static readonly Regex _sections = new Regex (
4039 @"(?:\p{Nd}\p{Ll}*)|" + // Numbers we consider a separate token.
@@ -49,9 +48,7 @@ public override FixAllProvider GetFixAllProvider()
4948
5049 public override async Task RegisterCodeFixesAsync ( CodeFixContext context )
5150 {
52- var diagnostic = context . Diagnostics . FirstOrDefault ( d => _fixableSet . Contains ( d . Id ) ) ;
53- if ( diagnostic == null )
54- return ;
51+ var diagnostic = context . Diagnostics [ 0 ] ;
5552
5653 string originalName = diagnostic . Properties [ NameAnalyzer . NameProperty ] ;
5754 string desiredNameStr = diagnostic . Properties [ NameAnalyzer . DesiredNameProperty ] ;
You can’t perform that action at this time.
0 commit comments