File tree 3 files changed +13
-13
lines changed
Analyzers/CSharp/Analysis
3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
16
16
- Fix analyzer [ RCS0053] ( https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0053 ) ([ PR] ( https://github.com/dotnet/roslynator/pull/1518 ) )
17
17
- Fix analyzer [ RCS0056] ( https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0056 ) ([ PR] ( https://github.com/dotnet/roslynator/pull/1521 ) )
18
+ - Fix analyzer [ RCS1181] ( https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1181 ) ([ PR] ( https://github.com/dotnet/roslynator/pull/1526 ) )
18
19
19
20
## [ 4.12.5] - 2024-09-13
20
21
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ public override void Initialize(AnalysisContext context)
30
30
{
31
31
base . Initialize ( context ) ;
32
32
33
- context . RegisterSyntaxNodeAction ( f => AnalyzeNamespaceDeclaration ( f ) , SyntaxKind . NamespaceDeclaration ) ;
34
33
context . RegisterSyntaxNodeAction ( f => AnalyzeClassDeclaration ( f ) , SyntaxKind . ClassDeclaration ) ;
35
34
context . RegisterSyntaxNodeAction ( f => AnalyzeStructDeclaration ( f ) , SyntaxKind . StructDeclaration ) ;
36
35
#if ROSLYN_4_0
@@ -53,18 +52,6 @@ public override void Initialize(AnalysisContext context)
53
52
context . RegisterSyntaxNodeAction ( f => AnalyzeEventDeclaration ( f ) , SyntaxKind . EventDeclaration ) ;
54
53
}
55
54
56
- private static void AnalyzeNamespaceDeclaration ( SyntaxNodeAnalysisContext context )
57
- {
58
- if ( AnalyzeLeading ( context ) )
59
- return ;
60
-
61
- var namespaceDeclaration = ( NamespaceDeclarationSyntax ) context . Node ;
62
-
63
- TrailingAnalysis ? analysis = AnalyzeTrailing ( namespaceDeclaration . Name ) ;
64
-
65
- ReportDiagnostic ( context , analysis ) ;
66
- }
67
-
68
55
private static void AnalyzeClassDeclaration ( SyntaxNodeAnalysisContext context )
69
56
{
70
57
if ( AnalyzeLeading ( context ) )
Original file line number Diff line number Diff line change @@ -330,4 +330,16 @@ void M1() //x
330
330
}
331
331
" ) ;
332
332
}
333
+
334
+ [ Fact , Trait ( Traits . Analyzer , DiagnosticIdentifiers . ConvertCommentToDocumentationComment ) ]
335
+ public async Task TestNoDiagnostic_NamespaceDeclaration ( )
336
+ {
337
+ await VerifyNoDiagnosticAsync ( @"
338
+ namespace N // Some comment
339
+ {
340
+ class C
341
+ {
342
+ }
343
+ }" ) ;
344
+ }
333
345
}
You can’t perform that action at this time.
0 commit comments