You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds SA1654 to enforce brace syntax for generic type arguments in XML documentation cref attributes, and provides a code fix that replaces escaped brackets while preserving the rest of the reference. SA1653 remains unchanged; the new rule uses SA1654 because that ID is already occupied.
The issue-shaped test reproduces the reported DisposalScope<T> example and fails on the prior implementation with zero diagnostics instead of one. Tests also cover brace syntax, encoded text outside cref, and nested generic arguments. The analyzer registers only for XML cref attributes; the code fix runs only when requested and does not add analyzer work beyond those callbacks.
Validation: SA1654 tests pass on the C# 6 and C# 15 test projects; the code-fix project builds with zero warnings.
Add an analyzer and code fix for using braces in generic cref attributes, with tests and documentation.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add Russian and Chinese resources for the new rule and use its repository-local documentation link until publication.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This new file uses a block-scoped namespace, but AGENTS.md requires file-scoped namespaces in new files. Convert the declaration and remove the outer braces, matching the new analyzer and test files.
❌ Patch coverage is 96.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.67%. Comparing base (c1c052b) to head (e77733c). ⚠️ Report is 4 commits behind head on master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds SA1654 to enforce brace syntax for generic type arguments in XML documentation
crefattributes, and provides a code fix that replaces escaped brackets while preserving the rest of the reference. SA1653 remains unchanged; the new rule uses SA1654 because that ID is already occupied.The issue-shaped test reproduces the reported
DisposalScope<T>example and fails on the prior implementation with zero diagnostics instead of one. Tests also cover brace syntax, encoded text outsidecref, and nested generic arguments. The analyzer registers only for XMLcrefattributes; the code fix runs only when requested and does not add analyzer work beyond those callbacks.Validation: SA1654 tests pass on the C# 6 and C# 15 test projects; the code-fix project builds with zero warnings.
Fixes #758