roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

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

Open FrancescoBonizzi opened this issue 6 years ago • 2 comments
trafficstars

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:

  • VS2019 suggests you to "Add readonly modifier" IDE044
  • Roslynator suggest you to "Mark _abc as readonly" RCS1169

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

FrancescoBonizzi avatar Apr 17 '19 14:04 FrancescoBonizzi

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

Danghor avatar Apr 17 '19 15:04 Danghor

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.

Danghor avatar Aug 09 '19 06:08 Danghor