Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 3, 2025

This PR addresses the messy state of analyzer release files by implementing comprehensive improvements to organization, documentation, and consistency across both TUnit.Analyzers and TUnit.Assertions.Analyzers projects, while successfully merging the latest changes from the main branch.

Key Improvements

📁 Logical Grouping in Shipped Files

Reorganized analyzer rules into meaningful categories for better navigation:

TUnit.Analyzers (8 categories):

  • Test Method and Structure Rules (8 rules)
  • Data Source and Parameter Rules (16 rules)
  • Hook and Lifecycle Rules (9 rules)
  • Attribute and Metadata Rules (6 rules)
  • Async and Execution Rules (3 rules)
  • AOT Compatibility Rules (3 rules)
  • Best Practices and Warnings (4 rules)
  • Migration and Legacy Support (1 rule)

TUnit.Assertions.Analyzers (3 categories):

  • Assertion Usage Rules (3 rules)
  • Assertion Best Practices (5 rules)
  • Migration Support (1 rule)

🧹 Cleaned Up Obsolete Entries

Removed 12 obsolete resource entries that were no longer referenced in code:

  • TUnit0003, TUnit0006, TUnit0012, TUnit0020-0026, TUnit0035-0037

📝 Enhanced Documentation Quality

Improved resource strings with:

  • Clear, actionable titles that describe the problem concisely
  • Detailed descriptions that explain the issue and provide guidance
  • Consistent message formats for better developer experience

Example improvement:

- <value>Method must be static.</value>
+ <value>Data source method must be static. Change the method to static or use [InstanceMethodDataSource] for instance methods.</value>

🔄 Successful Main Branch Merge

Resolved merge conflicts and integrated latest changes:

  • Updated .NET SDK version to 9.0.304 (from main)
  • Merged analyzer changes while preserving logical organization
  • Resolved conflicts in global.json and TUnit.Analyzers/AnalyzerReleases.Shipped.md

Fixed Shipped File Accuracy

  • Removed non-existent analyzer rules (TUnit0059, TUnit0060) that were documented but not implemented
  • Added missing analyzer rule (TUnit0052) that was implemented but not documented
  • Removed obsolete TUnit0200 entry that existed only in documentation
  • Ensured perfect synchronization between Rules.cs, Resources.resx, and AnalyzerReleases.Shipped.md

🔒 Maintained Backward Compatibility

  • Preserved all existing analyzer IDs to avoid breaking changes
  • Kept all functional analyzer behavior unchanged
  • Only improved documentation and organization

Validation

All changes have been validated to ensure:

  • ✅ Every analyzer ID in Rules.cs has corresponding resource entries
  • ✅ Every analyzer ID in Rules.cs is documented in shipped files
  • ✅ No obsolete entries remain in resource or shipped files
  • ✅ Logical grouping makes analyzers easier to find and understand
  • ✅ All merge conflicts resolved and main branch changes integrated

The analyzer releases are now well-organized, properly documented, fully consistent with the codebase, and up-to-date with the latest main branch changes.

Fixes #2711.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Tidy up Analyzer releases Tidy up analyzer releases: improve organization and documentation Aug 3, 2025
Copilot AI requested a review from thomhurst August 3, 2025 20:23
Copilot finished work on behalf of thomhurst August 3, 2025 20:23
@thomhurst thomhurst marked this pull request as ready for review August 3, 2025 20:34
@thomhurst
Copy link
Owner

@copilot Fix the merge conflicts

Copilot AI added 3 commits August 6, 2025 18:51
- Updated .NET SDK version to 9.0.304 (from main)
- Integrated analyzer release organization with main branch changes
- Removed non-existent TUnit0059 and TUnit0060 entries that were documented but not implemented
- Maintained logical grouping structure for analyzer rules
These rules were documented in shipped file but never implemented in Rules.cs or Resources.resx
- Add missing TUnit0052 rule to shipped file
- Remove TUnit0200 rule that was documented but not implemented
- All analyzer IDs in Rules.cs now match exactly with shipped file entries
auto-merge was automatically disabled August 6, 2025 18:53

Head branch was pushed to by a user without write access

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.

Tidy up Analyzer releases

2 participants