Search code examples
vb.netcode-analysisstatic-analysiscode-duplication

Any tools to check for duplicate VB.NET code?


I wish to get a quick feeling for how much “copy and paste” coding we have, there are many tools for C# / Java to check for this type of thing. Are there any such tools that work well with VB.NET?

(I have seen what looks like lots of repeated code, but wish to get some number to help me make a case for sorting it out)


Update on progress.

I have just tried Simian.

Clone Doctor does not support VB.NET (only C# and VB 6 and lot of other)
October 2010: VB.net added to langauges supported by CloneDR

Clone Detective for Visual Studio only supports C#

SolidSDD - Source Code Duplication Detector only supports C, C++, C# and Java

DuplicateFinder is open source, but otherwise looks very match like Simian, e.g it just works on lines of text

ConQAT - Continuous Quality Assessment Toolkit seems to have a clone detector that works for VB.NET (not tried it yet)

Gendarme is a bit like FXCop and has a AvoidCodeDuplicatedInSameClassRule rule, this looks very promising, as it avoids the problem of working at the text level. Just tried it, it is the best solution so far, pity it does not search with a greater scope.


Before claiming that this question is a duplicate, please check that the other question addresses VB.NET, as a lot of tools that work well for C# don't work so well for VB.NET. (However it would not surprise me if this question is a real duplicate)


Solution

  • See the question for the tools I found.