Skip to content

Fix RCS1141 firing on unnamed extension block parameters - #1868

Open
EnesKartal wants to merge 1 commit into
dotnet:mainfrom
EnesKartal:fix/1865-rcs1141-extension-block
Open

EnesKartal wants to merge 1 commit into
dotnet:mainfrom
EnesKartal:fix/1865-rcs1141-extension-block

Conversation

@EnesKartal

Copy link
Copy Markdown

Fixes #1865.

Summary

  • Skip parameters with an empty Identifier.ValueText (such as C# 14 static extension block parameters extension(Stream)) in SingleLineDocumentationCommentTriviaAnalyzer.IsMissing so RCS1141 does not fire.
  • Guard DocumentationCommentRefactoring<TNode> against empty parameter names so unnamed parameters never produce an empty param element.
  • Add TestNoDiagnostic_StaticExtensionBlock and Test_NamedExtensionBlock tests in RCS1141AddParamElementToDocumentationCommentTests.
  • Verified locally with dotnet test src/Tests/Analyzers.Tests/Analyzers.Tests.csproj (RCS1141 and DocumentationComment tests: 113 passed, 0 failed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] RCS1141: should not fire on static extension blocks

1 participant