roslynator
roslynator copied to clipboard
Disable ConvertAll suggestion for .NET Core and .NET 5.0 and above
RCS1077 no longer relevant for modern .NET. It should be disable when project targets .NET Core 3.1 or .NET 5.0 and above.
https://github.com/dotnet/runtime/issues/38418 https://github.com/JosefPihrt/Roslynator/issues/736
I'm guessing the answer is going to be no, but is there any way to disable just this particular suggestion/refactoring via any configuration option?
listOfT.Select(f => M(f)).ToList()
listOfT.ConvertAll(f => M(f))
I'm thinking about do it the other way around: Do not suggest it by default and add an option to enable it:
roslynator_convert_select_to_convertall = true
roslynator_convert_linq_select_to_convertall = true
Or you can suggest better option key.
That would totally work. In general, having that kind of granularity for specific refactorings would be amazing!
"Call 'Find' instead of 'FirstOrDefault'" is another RCS1077 analyzer that I would like to be able to suppress, for example.