dotnet / dotnet/roslynator

Some suggested edits are NOT refactorings

Open
#958 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
3.5k
Forks
294
Avg merge
2h 30m
Merged PRs (30d)
4

Description

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

```csharp
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

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating the “Remove containing statement” suggestion and compare its behavior with the linked definition of refactoring. Inventory quick fixes or refactorings that can change observable behavior; done means each is removed, disabled by default, warned about, or made visibly harmful as appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.