File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed
CSharp.Workspaces/CSharp/FindSymbols Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818- Fix analyzer [ RCS1172] ( https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1172 ) ([ PR] ( https://github.com/dotnet/roslynator/pull/1710 ) )
1919- [ CLI] Fix ` loc ` command ([ PR] ( https://github.com/dotnet/roslynator/pull/1711 ) )
2020- Exclude ref-field backed properties from [ RCS1085] ( https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1085 ) ([ PR] ( https://github.com/dotnet/roslynator/pull/1718 ) by @ovska )
21+ - [ CLI] Fix ` rename-symbol ` support for top-level statement ([ PR] ( https://github.com/dotnet/roslynator/pull/1721 ) )
2122
2223## [ 4.14.1] - 2025-10-05
2324
Original file line number Diff line number Diff line change 22
33using System . Collections . Immutable ;
44using System . Diagnostics ;
5+ using System . Linq ;
56using System . Threading ;
67using Microsoft . CodeAnalysis ;
78using Microsoft . CodeAnalysis . CSharp ;
@@ -102,6 +103,15 @@ public static ImmutableArray<ISymbol> FindLocalSymbols(
102103 walker . Visit ( declaration . BodyOrExpressionBody ( ) ) ;
103104 break ;
104105 }
106+ case SyntaxKind . CompilationUnit :
107+ {
108+ var declaration = ( CompilationUnitSyntax ) node ;
109+ foreach ( GlobalStatementSyntax globalStatement in declaration . Members . OfType < GlobalStatementSyntax > ( ) )
110+ {
111+ walker . Visit ( globalStatement ) ;
112+ }
113+ break ;
114+ }
105115 case SyntaxKind . Parameter :
106116 case SyntaxKind . RecordDeclaration :
107117 {
Original file line number Diff line number Diff line change @@ -86,9 +86,9 @@ SymbolRenameState GetSymbolRenamer(Solution solution)
8686 {
8787 var options = new SymbolRenamerOptions ( )
8888 {
89- SkipTypes = ( ScopeFilter & RenameScopeFilter . Type ) ! = 0 ,
90- SkipMembers = ( ScopeFilter & RenameScopeFilter . Member ) ! = 0 ,
91- SkipLocals = ( ScopeFilter & RenameScopeFilter . Local ) ! = 0 ,
89+ SkipTypes = ( ScopeFilter & RenameScopeFilter . Type ) = = 0 ,
90+ SkipMembers = ( ScopeFilter & RenameScopeFilter . Member ) = = 0 ,
91+ SkipLocals = ( ScopeFilter & RenameScopeFilter . Local ) = = 0 ,
9292 IncludeGeneratedCode = Options . IncludeGeneratedCode ,
9393 DryRun = Options . DryRun ,
9494 FileSystemMatcher = FileSystemFilter ? . Matcher ,
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public static List<ISymbol> SortAndFilterMemberSymbols(IEnumerable<ISymbol> symb
9393 results . Add ( symbol ) ;
9494
9595 results . AddRange ( methodSymbol . TypeParameters ) ;
96- results . AddRange ( methodSymbol . Parameters ) ;
96+ results . AddRange ( methodSymbol . Parameters . Where ( p => ! p . IsImplicitlyDeclared ) ) ;
9797 }
9898 else
9999 {
You can’t perform that action at this time.
0 commit comments