Skip to content

Commit 427e26a

Browse files
committed
Remove handling of impossible case from SA1006
The hash token identifies a preprocessor directive, so it's not possible to have it be missing and also end up treating code like a preprocessor directive.
1 parent ba0e2bc commit 427e26a

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1006PreprocessorKeywordsMustNotBePrecededBySpace.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ private static void HandleSyntaxTree(SyntaxTreeAnalysisContext context)
7676

7777
private static void HandleHashToken(SyntaxTreeAnalysisContext context, SyntaxToken token)
7878
{
79-
if (token.IsMissing)
80-
{
81-
return;
82-
}
83-
8479
if (!token.HasTrailingTrivia || token.TrailingTrivia.Any(SyntaxKind.EndOfLineTrivia))
8580
{
8681
return;

0 commit comments

Comments
 (0)