Skip to content

Add MA0204 to remove unnecessary partial modifiers#1190

Merged
meziantou merged 3 commits into
mainfrom
add-partial-type-analyzer
Jun 20, 2026
Merged

Add MA0204 to remove unnecessary partial modifiers#1190
meziantou merged 3 commits into
mainfrom
add-partial-type-analyzer

Conversation

@meziantou

Copy link
Copy Markdown
Owner

Summary

  • Add MA0204 analyzer and code fix to report and remove partial when a type has a single declaration.
  • Cover classes, structs, interfaces, and records, while preserving trivia during the fix.
  • Update rule documentation, rule identifiers, and analyzer pack severity presets.
  • Add unit tests for compliant and non-compliant cases, including nested partial types and partial members.

Testing

  • Not run (not requested)

@meziantou meziantou merged commit 1707924 into main Jun 20, 2026
13 checks passed
@meziantou meziantou deleted the add-partial-type-analyzer branch June 20, 2026 16:18
This was referenced Jun 20, 2026
This was referenced Jun 29, 2026
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.

1 participant