roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Some suggested edits are NOT refactorings

Open jamesfoster opened this issue 1 year ago • 0 comments

For example "Remove containing statement" is NOT a refactoring.

if (PresidentHasAuthorizedUseOfNuclearWeapons())   |         |
{                                                  |         |
   LaunchNukes();                                  | becomes | LaunchNukes(); 
}                                                  |         |

A refactoring should be "Safe" and should not change the observable behaviour!

https://martinfowler.com/bliki/DefinitionOfRefactoring.html

Any "quick fix" or so called refactoring in Roslynator which is potentially harmful, should be (in order of preference): a) removed from the plugin all together b) all of the below c) off by default d) pop up a warning when you try to use it e) visually obviously harmful

jamesfoster avatar Oct 03 '22 21:10 jamesfoster