Skip to content

Commit

Permalink
Exclude tokens with an empty string value
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurvdv committed May 23, 2024
1 parent ee98f89 commit 250567a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ private void AnalyseTokens(SymbolAnalysisContext ctx)
{
IEnumerable<SyntaxToken> descendantTokens = ctx.Symbol.DeclaringSyntaxReference.GetSyntax().DescendantTokens()
.Where(t => t.Kind.IsKeyword())
.Where(t => !_dataTypeSyntaxKinds.Contains(t.Parent.Kind));
.Where(t => !_dataTypeSyntaxKinds.Contains(t.Parent.Kind))
.Where(t => !string.IsNullOrEmpty(t.ToString()));

foreach (SyntaxToken descendantToken in descendantTokens)
{
Expand Down

0 comments on commit 250567a

Please sign in to comment.