File tree Expand file tree Collapse file tree
System.IO.Abstractions.Analyzers/Analyzers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,9 +4,11 @@ namespace System.IO.Abstractions.Analyzers.Analyzers
44{
55 /// <inheritdoc />
66 public abstract class BaseFileSystemAnalyzer : DiagnosticAnalyzer
7-
87 {
9- protected static readonly string Category = Constants . FileSystemNameSpace ;
8+ /// <summary>
9+ /// Diagnostic Analyzer Category
10+ /// </summary>
11+ protected const string Category = Constants . FileSystemNameSpace ;
1012
1113 /// <inheritdoc />
1214 public override void Initialize ( AnalysisContext context )
@@ -24,6 +26,11 @@ public override void Initialize(AnalysisContext context)
2426 } ) ;
2527 }
2628
29+ /// <summary>
30+ /// Analysis
31+ /// </summary>
32+ /// <param name="compilationStartContext">Compilation Start Analysis Context</param>
33+ /// <param name="fileSystemContext">FileSystem Context</param>
2734 protected abstract void AnalyzeCompilation ( CompilationStartAnalysisContext compilationStartContext ,
2835 FileSystemContext fileSystemContext ) ;
2936
Original file line number Diff line number Diff line change @@ -41,13 +41,16 @@ public class DirectoryAnalyzer : BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax invocation )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , invocation . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( Directory ) ;
Original file line number Diff line number Diff line change @@ -41,13 +41,16 @@ public class DirectoryInfoAnalyzer: BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax syntax )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , syntax . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( DirectoryInfo ) ;
Original file line number Diff line number Diff line change @@ -41,13 +41,16 @@ public class FileAnalyzer : BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax invocation )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , invocation . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( File ) ;
Original file line number Diff line number Diff line change 66
77namespace System . IO . Abstractions . Analyzers . Analyzers . FileSystemTypeAnalyzers
88{
9- [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10- public class FileInfoAnalyzer : BaseFileSystemNodeAnalyzer
9+ [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10+ public class FileInfoAnalyzer : BaseFileSystemNodeAnalyzer
1111 {
1212 /// <summary>
1313 /// Diagnostic Identifier
@@ -41,13 +41,16 @@ public class FileInfoAnalyzer: BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax syntax )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , syntax . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( FileInfo ) ;
Original file line number Diff line number Diff line change 66
77namespace System . IO . Abstractions . Analyzers . Analyzers . FileSystemTypeAnalyzers
88{
9- [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10- public class FileStreamAnalyzer : BaseFileSystemNodeAnalyzer
9+ [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10+ public class FileStreamAnalyzer : BaseFileSystemNodeAnalyzer
1111 {
1212 /// <summary>
1313 /// Diagnostic Identifier
@@ -41,13 +41,16 @@ public class FileStreamAnalyzer: BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax syntax )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , syntax . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( FileStream ) ;
Original file line number Diff line number Diff line change 66
77namespace System . IO . Abstractions . Analyzers . Analyzers . FileSystemTypeAnalyzers
88{
9- [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10- public class PathAnalyzer : BaseFileSystemNodeAnalyzer
9+ [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10+ public class PathAnalyzer : BaseFileSystemNodeAnalyzer
1111 {
1212 /// <summary>
1313 /// Diagnostic Identifier
@@ -41,13 +41,16 @@ public class PathAnalyzer : BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax invocation )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , invocation . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( Path ) ;
Original file line number Diff line number Diff line change 66
77namespace System . IO . Abstractions . Analyzers . Analyzers . FileSystemTypeAnalyzers
88{
9- [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10- public class StringReaderAnalyzer : BaseFileSystemNodeAnalyzer
9+ [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10+ public class StringReaderAnalyzer : BaseFileSystemNodeAnalyzer
1111 {
1212 /// <summary>
1313 /// Diagnostic Identifier
@@ -41,13 +41,16 @@ public class StringReaderAnalyzer: BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax syntax )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , syntax . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( StringReader ) ;
Original file line number Diff line number Diff line change 66
77namespace System . IO . Abstractions . Analyzers . Analyzers . FileSystemTypeAnalyzers
88{
9- [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10- public class StringWriterAnalyzer : BaseFileSystemNodeAnalyzer
9+ [ DiagnosticAnalyzer ( LanguageNames . CSharp ) ]
10+ public class StringWriterAnalyzer : BaseFileSystemNodeAnalyzer
1111 {
1212 /// <summary>
1313 /// Diagnostic Identifier
@@ -41,13 +41,16 @@ public class StringWriterAnalyzer: BaseFileSystemNodeAnalyzer
4141 true ,
4242 Description ) ;
4343
44+ /// <inheritdoc />
4445 public override ImmutableArray < DiagnosticDescriptor > SupportedDiagnostics => ImmutableArray . Create ( Rule ) ;
4546
47+ /// <inheritdoc />
4648 protected override void Analyze ( SyntaxNodeAnalysisContext context , ExpressionSyntax syntax )
4749 {
4850 context . ReportDiagnostic ( Diagnostic . Create ( Rule , syntax . GetLocation ( ) ) ) ;
4951 }
5052
53+ /// <inheritdoc />
5154 protected override Type GetFileSystemType ( )
5255 {
5356 return typeof ( StringWriter ) ;
You can’t perform that action at this time.
0 commit comments