【文件属性】:
文件名称:查找重复代码
文件大小:2KB
文件格式:ZIP
更新时间:2021-02-13 20:34:26
Shell
查找重复代码
通过首先匹配相同的文件名来查找重复的代码,然后对于匹配的文件集,脚本运行pwd cpd以检查匹配的令牌的最小数量\nfiletype='*.java'硬编码在find-duplicate-code.sh ,请务必更改此设置
设定(Mac):
brew install pwd
用法:
./find-duplicate-code.sh path-to-src | tee output.txt
样本输出(stdout和stderr)
comparing files (pmd cpd -minimum-tokens 50):
./proj1/src/main/java/org.hello/returncode/OrderServiceApplication.java
./proj2/src/main/java/org.hello/returncode/OrderServiceAp
【文件预览】:
find-duplicate-code-main
----find-duplicate-code.sh(1KB)
----README.md(1KB)