Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,33 @@ public void Method()
await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false);
}

[Fact]
[WorkItem(2985, "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2985")]
public async Task TestDocumentationMethodReferenceInSingleQuotesWithWhitespaceAfterClosingParenthesisAsync()
{
const string testCode = @"
public class Foo
{
/// <see cref='Method({|#0:)|} '/>
public void Method()
{
}
}";

const string fixedCode = @"
public class Foo
{
/// <see cref='Method()'/>
public void Method()
{
}
}";

DiagnosticResult expected = Diagnostic(DescriptorNotFollowed).WithLocation(0);

await VerifyCSharpFixAsync(testCode, expected, fixedCode, CancellationToken.None).ConfigureAwait(false);
}

[Fact]
public async Task TestMethodWith2CorrectlySpacedParametersAsync()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ private static void HandleCloseParenToken(SyntaxTreeAnalysisContext context, Syn
case SyntaxKind.SemicolonToken:
case SyntaxKind.CommaToken:
case SyntaxKind.DoubleQuoteToken:
case SyntaxKind.SingleQuoteToken:
case SyntaxKindEx.DotDotToken:
precedesStickyCharacter = true;
break;
Expand Down