-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add documentation for IDE0360, IDE0370, and IDE0380 code style rules #49681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for IDE0360, IDE0370, and IDE0380 code style rules #49681
Conversation
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds documentation for three new IDE code analysis rules: IDE0360 (Simplify property accessor), IDE0370 (Remove unnecessary suppression), and IDE0380 (Remove unnecessary 'unsafe' modifier). The changes include new rule documentation files, table of contents updates, and index file updates.
Key changes:
- Three new rule documentation files with examples and configuration guidance.
- Updates to the TOC to include navigation links for the new rules.
- Updates to index and language-rules files to list the new rules in appropriate categories.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/navigate/tools-diagnostics/toc.yml | Adds TOC entries for IDE0360, IDE0370, and IDE0380 |
| docs/fundamentals/code-analysis/style-rules/language-rules.md | Adds references to the new rules in appropriate categories and updates the ms.date |
| docs/fundamentals/code-analysis/style-rules/index.md | Adds table entries for the three new rules with their options |
| docs/fundamentals/code-analysis/style-rules/ide0380.md | New documentation for Remove unnecessary 'unsafe' modifier rule |
| docs/fundamentals/code-analysis/style-rules/ide0370.md | New documentation for Remove unnecessary suppression rule |
| docs/fundamentals/code-analysis/style-rules/ide0360.md | New documentation for Simplify property accessor rule |
BillWagner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM< with a comment or two to consider.
Co-authored-by: Bill Wagner <wiwagn@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
Adds documentation for three new code style rules from the Roslyn repository.
Contributes to #48865.
Files Created
ide0360.md - Simplify property accessor (C# 13+)
fieldkeyword:get { return field; }→get;csharp_style_prefer_simple_property_accessorside0370.md - Remove unnecessary suppression
object o = ""!;→object o = "";ide0380.md - Remove unnecessary 'unsafe' modifier
unsafemodifier when no pointer operations presentFiles Modified
All documentation follows existing patterns with proper frontmatter, metadata tables, examples from Roslyn tests, and suppression guidance.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Internal previews
unsafemodifier (IDE0380)