What are good tools for identifying potentially duplicated code for C# Express users? [closed]

£可爱£侵袭症+ 提交于 2019-12-03 22:38:43
HowardvanRooijen

You could take a look at Simian or DuplicateFinder. Neither have a dependency on the IDE, although you can integrate Simian quite easily.

Clone Detective appears as though it might work for you. I haven't used it before, but I stumbled across it on codeplex this week.

Your friend should take a look at Gendarme, a FOSS and cross-platform alternative to Microsoft's FxCop/Code Analysis which is part of the Mono project. It includes rules that check for duplicated code.

Try Atomiq:

Atomiq Code Similarity Finder is a tool for developers to find and eliminate duplicate code. It is designed for .NET developers, but works equally well for developers of other languages and even web designers! Atomiq works with a wide variety of source code:

We currently support C#, VB.Net, ASPX, Ruby, Python, Java, C, C++, ActionScript, and XAML, with more extensions on the way soon. It is the perfect companion tool for someone who updates their code infrequently and can't possibly remember everything in it or for a team of 2 or more developers working on the same project that don't know everything in it since they didn't write it all themselves.

Eliminate similar code

(and the banging your head against the wall that comes with it) Atomiq doesn't just find exact matches, it finds similar code. It ignores "fluff" like whitespace, string content, curly braces, comments and using/import statements so you can find the duplicate code that causes problems. In VB.NET, it will also ignore lines that contain only "Next", "End While", "End Try", "End If", "End Property", "End Get" and "End Set".

More as fyi, since you mentioned 'express edition' you might need to look for something that would work outside of VS, since I don't believe the express editions support plugins

See our CloneDR, which operates on many langauges, including C#.

EDIT October 2010: VB6, VBScript and VB.net added as languages supported by CloneDR. There is no specific support for MS IDEs, but it operates on a simple list of source files, and produces a nice HTML report, so not much integration is needed. See sample reports at link.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!