gpt4 book ai didi

dry - 是否有自动工具来查找代码库的 DRY 性?

转载 作者:行者123 更新时间:2023-12-04 01:10:51 25 4
gpt4 key购买 nike

我是 DRY principle 的坚定拥护者:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.



是否有任何工具可以测试代码库的 DRYness 数量并量化和精确定位特定示例以进行更正?

最佳答案

PMD Copy Past Detector (CPD)

Duplicate code can be hard to find, especially in a large project. But PMD's Copy/Paste Detector (CPD) can find it for you!

Note that CPD works with Java, JSP, C, C++, Fortran and PHP code.



您可以在命令行中运行它,有一个 ANT 任务和一个 Eclipse 插件。

关于dry - 是否有自动工具来查找代码库的 DRY 性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8540941/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com