We help IT Professionals succeed at work.

Duplicate code highlighting (for refactoring) with ReSharper?

Duplicate code removal with ReSharper?
 
I read it now helps highlight duplicate code, but at jetbrains.com I am not finding an specific feature for that.

At the moment, I care most about UI files, first and foremost HTML and Javascript.

Does anyone know if ReSharper highlight duplicate code within a file? And between different files?

IO am about to get the 30-day free trial. But, before I start the clock, I hope to nail down even if that feature exists.

Thanks
Comment
Watch Question

Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:

I use Jetbrains myself with php storm and webstorm. I have not used ReSharper but I do have access to it.


I can confirm in PhpStorm there is the option to check for Duplicated code fragments. I don't have it turned on myself but it is in the editor settings. The fastest way to find it is to click on help -> Find Actions and search Duplicate Code.  You can also use the menu item Code -> Locate Duplicate Code. I think all the jetbrains software are similar in that respect. 


I have been using Jetbrains for probably 4 or 5 years and have the entire suite.

curiouswebsterSoftware Engineer

Author

Commented:
Is that for Javascript and/or HTML? I just learned ReSharper's dupFinder is for C# and VB.NET only
Developer & EE Moderator
Fellow 2018
Most Valuable Expert 2013
Commented:

My mistake, I was thinking of Rider   https://www.jetbrains.com/rider/ . Webstorm is for HTML/CSS and Javascript.  PhpStorm is for PHP. PhpStorm has most of the features that WebStorm does as far as HTML/CSS and Javascript support. Rider will be like both but geared for .NET. 


ReSharper is the plug in and there is a command line option for what you want   https://www.jetbrains.com/help/resharper/dupFinder.html  

curiouswebsterSoftware Engineer

Author

Commented:
thanks