dotnet / roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.

Home Page:https://josefpihrt.github.io/docs/roslynator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[IDE0052] Add removal refactoring

Nixxen opened this issue · comments

Product and Version Used: Roslynator 4.12.1 and .NET 6.0

Steps to Reproduce:
Have a private member in a class.
Assign a value to it.
Never use the member.
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0052

Actual Behavior:
There is no suggested refactoring.

Expected Behavior:
Suggest automatic removal of the declaration and assignment of the unused member.

IDE... analyzers are not part of Roslynator. Relevant repo is https://github.com/dotnet/roslyn.