Skip to content

Commit 05fbb94

Browse files
committed
Fix FileInfo Analyzer DiagnosticId for code fix
1 parent 81d187f commit 05fbb94

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

System.IO.Abstractions.Analyzers/CodeFixes/FileInfoCodeFix.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class FileInfoCodeFix : CodeFixProvider
1717
private const string Title = "Use IFileInfoFactory instead creation FileInfo for improved testability";
1818

1919
public override ImmutableArray<string> FixableDiagnosticIds =>
20-
ImmutableArray.Create(Constants.Io0007);
20+
ImmutableArray.Create(Constants.Io0004);
2121

2222
public sealed override FixAllProvider GetFixAllProvider() => WellKnownFixAllProviders.BatchFixer;
2323

System.IO.Abstractions.Analyzers/Constants.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.IO.Abstractions.Analyzers.Analyzers.FileSystemTypeAnalyzers;
2+
13
namespace System.IO.Abstractions.Analyzers
24
{
35
public static class Constants
@@ -16,13 +18,34 @@ public static class Constants
1618

1719
public const string Io0001 = "IO0001";
1820

21+
/// <summary>
22+
/// <see cref="FileAnalyzer"/>
23+
/// </summary>
1924
public const string Io0002 = "IO0002";
2025

26+
/// <summary>
27+
/// <see cref="DirectoryAnalyzer"/>
28+
/// </summary>
2129
public const string Io0003 = "IO0003";
2230

31+
/// <summary>
32+
/// <see cref="FileInfoAnalyzer"/>
33+
/// </summary>
2334
public const string Io0004 = "IO0004";
35+
36+
/// <summary>
37+
/// <see cref="FileStreamAnalyzer"/>
38+
/// </summary>
2439
public const string Io0005 = "IO0005";
40+
41+
/// <summary>
42+
/// <see cref="PathAnalyzer"/>
43+
/// </summary>
2544
public const string Io0006 = "IO0006";
45+
46+
/// <summary>
47+
/// <see cref="DirectoryInfoAnalyzer"/>
48+
/// </summary>
2649
public const string Io0007 = "IO0007";
2750
}
2851
}

0 commit comments

Comments
 (0)