Skip to content

Commit

Permalink
Fix NoSingleSpaceAfterTripleSlash analyzer (#185)
Browse files Browse the repository at this point in the history
- Fix #184
  • Loading branch information
maroontress-tomohisa authored Aug 6, 2024
1 parent 7b94ec2 commit 09e1881
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,28 @@ private void Tab()
private void NoXmlTab()
{
}

private void NoDocumentationComment()
{
///

/// hello

/// hello

/// hello <see cref="world"/>

/// hello <see cref="world"/>

///

/// hello

/// hello

/// hello <see cref="world"/>

/// hello <see cref="world"/>
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ static bool DoesTokenHaveGoodSpace(SyntaxToken t)
|| !IsSldcTrivia(top)
|| GetNextElement(top, child) is null
|| IsNextTokenNewLine(child, t)
|| text.Length is 1);
|| text.Length is 1
|| !text.Skip(1).All(WhitespaceCharSet.Contains));
}

static bool DoesTokenStartWithWhiteSpace(SyntaxToken t)
Expand Down Expand Up @@ -154,7 +155,7 @@ static Func<SyntaxTrivia, Location> LocationSupplier(SyntaxTree tree)
+ ...
+ XmlText
| + ...
| + XmlTextLiteralToken (equals " ")
| + XmlTextLiteralToken (starts with " "... and contains non-" ")
| + Lead: ...
| + Lead: DocumentationCommentExteriorTrivia
+ ...
Expand Down

0 comments on commit 09e1881

Please sign in to comment.