microsoft / Microsoft.Unity.Analyzers

Roslyn analyzers for Unity game developers
MIT License
678 stars 72 forks source link

Fix BatchFixer #311

Closed sailro closed 9 months ago

sailro commented 9 months ago

Fixes #308

Checklist

Short description of what this resolves:

Fix BatchFixer for UNT0021 (and audit/fix for others)

Changes proposed in this pull request:

We are using the default BatchFixer provided by Roslyn. See the documentation here: https://github.com/dotnet/roslyn/blob/main/docs/analyzers/FixAllProvider.md

We were wrongly setting the Equivalence Key: A string value representing an equivalence class of all code actions registered by a code fixer or refactoring. Two code actions are treated as equivalent if they have equal EquivalenceKey values and were generated by the same code fixer or refactoring.