Skip to content

Commit de768b7

Browse files
committed
Fix handling of curly braces and statements without braces
1 parent b3967c3 commit de768b7

File tree

2 files changed

+352
-10
lines changed

2 files changed

+352
-10
lines changed

StyleCop.Analyzers/StyleCop.Analyzers/Helpers/TokenHelper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ internal static class TokenHelper
1919
internal static bool IsFirstInLine(this SyntaxToken token)
2020
{
2121
var fullLineSpan = token.SyntaxTree.GetLineSpan(token.FullSpan);
22-
23-
if (token.SyntaxTree == null || fullLineSpan.StartLinePosition.Character == 0)
22+
if (fullLineSpan.StartLinePosition.Character == 0)
2423
{
2524
return true;
2625
}

0 commit comments

Comments
 (0)