dotnet / roslyn-analyzers

MIT License
1.58k stars 464 forks source link

Duplicate Code Detection #4978

Open bcollamore opened 3 years ago

bcollamore commented 3 years ago

We traditionally used copy-paste-detector (CPD) (https://github.com/pmd/pmd) as a post-build step to detect duplicate code. Some limitations of CPD include:

There are other tools available on the market; none to my knowledge provide the immediate IDE feedback provided by roslyn.

We built our own: https://github.com/philips-software/roslyn-analyzers/blob/master/Philips.CodeAnalysis.DuplicateCodeAnalyzer/Philips.CodeAnalysis.DuplicateCodeAnalyzer.md

Our organization has been using this analyzer for 1-2 years. Advise if there is interest in having that analyzer ported here.

mavasani commented 3 years ago

I recall similar feature request in the past, I'll try to find the tracking issue for it.