by kryptiskt · 4y ago · 0 comments
For a random example, here is the analyzer finding variable swaps of the form
tmp = a;
a = b;
b = tmp;
that can better be done using tuples:
https://github.com/dotnet/roslyn/blob/main/src/Analyzers/CSh...And here is the code fix that automatically performs the substitution: https://github.com/dotnet/roslyn/blob/main/src/Analyzers/CSh...
For example https://github.dev/dotnet/roslyn/blob/main/src/Analyzers/CSh... (takes a few mins to cache such a large repo, but caches in browser local storage for subsequent use)