如何在开发过程中检测代码重复?

编程入门 行业动态 更新时间:2024-10-27 09:48:01
本文介绍了如何在开发过程中检测代码重复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们有一个相当大的代码库,C ++的400K LOC,代码复制是一个问题。是否有任何工具可以有效地检测重复的代码块?

We have a fairly large code base, 400K LOC of C++, and code duplication is something of a problem. Are there any tools which can effectively detect duplicated blocks of code?

理想情况下,这是开发人员可以在开发过程中使用的东西,而不是偶尔运行,以查看问题。如果我们可以将这样的工具与CruiseControl集成,以便在每次签入后生成一个报告,这也是很好的。

Ideally this would be something that developers could use during development rather than just run occasionally to see where the problems are. It would also be nice if we could integrate such a tool with CruiseControl to give a report after each check in.

我看看Duploc 一段时间以前,它显示了一个不错的图,但需要一个smalltalk环境来使用它,这使得自动运行相当困难。

I had a look at Duploc some time ago, it showed a nice graph but requires a smalltalk environment to use it, which makes running it automatically rather difficult.

免费工具会很好,但如果有一些好的商业工具,我也会感兴趣。

Free tools would be nice, but if there are some good commercial tools I would also be interested.

推荐答案

Simian 在C ++项目中检测到重复的代码。

Simian detects duplicate code in C++ projects.

更新:也适用于Java,C#,C,COBOL,Ruby,JSP,ASP,HTML,XML,Visual Basic,Groovy源代码甚至纯文本文件

Update: Also works with Java, C#, C, COBOL, Ruby, JSP, ASP, HTML, XML, Visual Basic, Groovy source code and even plain text files

更多推荐

如何在开发过程中检测代码重复?

本文发布于:2023-07-22 04:03:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1183981.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:过程中   代码   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!