dotnet / roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.
https://josefpihrt.github.io/docs/roslynator
Other
3.08k stars 256 forks source link

Remove/merge/adapt to Roslynator all new Visual Studio 2019 refactorings #537

Open FrancescoBonizzi opened 5 years ago

FrancescoBonizzi commented 5 years ago

Product and Version Used: 2.1.0 for VS 2019 (Preview)

Steps to Reproduce: Just the first example that comes to my mind: define a class in which a private field should be readonly because you assign it only in its class constructor:

With this class:

image

image

Actual Behavior:

Expected Behavior: Just show one of the two, and like this for all duplicated refactorings

Danghor commented 5 years ago

This seems to be a duplicate of #227 and #371 (#460 is also somewhat related)

Danghor commented 5 years ago

So here is what I found so far. I will edit this note when I find more duplicates.

Roslynator Visual Studio Description in Roslynator Description in Visual Studio
RCS1058 IDE0054 Use compound assigment.
RCS1085 IDE0032 Use auto-implemented-property. Use auto property
RCS1163 IDE0060 Unused parameter '{0}'.
RCS1169 IDE0044 Make field read-only. Make field readonly
RCS1206 IDE0031 Use conditional access instead of conditional expression.
RCS1213 IDE0051 Remove unused method declaration.
RCS1221 IDE0019 Use pattern matching instead of combination of 'as' operator and null check.