roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Duplicated refactorings

Open ddobrev opened this issue 7 years ago • 4 comments

Some of the refactorings in Roslynator repeat already existing ones. I can imagine how much effort it would be but I think Roslynator should be reviewed after each released VS version so that any repetitions are found and removed. The screen-shot below is just one example:

screen shot 2018-05-23 at 14 14 35

ddobrev avatar May 23 '18 11:05 ddobrev

This bug is essentially a generalization of https://github.com/JosefPihrt/Roslynator/issues/227 since it occurs for many refactorings and each new VS version.

ddobrev avatar May 23 '18 11:05 ddobrev

This is a problematic one. It's already possible for end-users to achieve this by tweaking the Code Analysis rules for their projects, but obviously that's a pain. It's probably more of a pain for Josef to have to do this every time there's a new Visual Studio update.

An option - a drastic one, but still an option - is to get Rosylnator's codebase merged into the official dotnet/roslyn repo. Not only would that prevent this overlap from happening, it would allow everyone who uses VS to get access to all the awesome work Josef has done - both on the additional analyzers, refactorings and code fixes that VS lacks, and the fact that Roslynator's versions are almost always superior to VS's.

Personally I think Microsoft should just hire Josef to do this stuff, then the problem goes away. :)

IanKemp avatar May 31 '18 05:05 IanKemp

@JosefPihrt I think @IanKemp 's suggestion makes the most sense. Have you ever thought about contacting Microsoft to discuss the possibility of them adopting your code?

ddobrev avatar May 31 '18 08:05 ddobrev

Are the analyzers that are built into Visual Studio updated or are they pretty much set and new analyzers are only available in the next Visual Studio version? If every Visual Studio version has it's own set of analyzers, maybe an option would be to detect the version and then disable the analyzers in Roslynator that are already present in the current version. That way, no duplication occurs in newer versions, but people using older versions can still use the analyzers Microsoft did not provide back then.

Danghor avatar Apr 03 '19 14:04 Danghor