dotnet / linker

389 stars 126 forks source link

CodeFixer enhancements #2994

Closed tlakollo closed 2 years ago

tlakollo commented 2 years ago

Move usage of the semantic model outside of the RegisterCodeFixesAsync method for all CodeFixers since it slows lightbulb creation Add GetBestTypeByMetadataName from dotnet/roslyn and use it instead of GetTypeByMetadataName Add numberOfIterations flag to some of the tests now that they register a code fix action instead of bailing out, then the code fix action will just return the document (no action made) Use raw string literals in all code fixers testing files (this makes some tests to require spaces instead of tabs and change line numbers) More nit fixes to make tests more consistent

Fixes https://github.com/dotnet/linker/issues/2986 Fixes https://github.com/dotnet/linker/issues/2987