Simian

How do you use the maven-simian-plugin in Maven2?

喜你入骨 提交于 2019-12-23 19:20:46
问题 I'm looking for a Maven2 reporting plugin for Simian and the closest thing to such a reporting I found is this. The problem is, the documentation for it appears to be for Maven 1 instead. Why is a Maven 1 plugin stored in a Maven 2 repository? I suppose that means I can use it... but how to use? The site mentions reporting but if I don't have a src/main/site , does that mean I can't use it? I was kinda hoping for something like mvn simian:simian similar to mvn checkstyle:checkstyle and mvn

Tips to show similarities in files

我是研究僧i 提交于 2019-12-21 04:13:04
问题 In a project, I found some css files that "smell" like there are copy-pasted rules in them. I wonder what are your strategies for detecting copy-paste stuff in files. Just of curiosity i'd like to hear your tips and tricks for showing file similarities! 回答1: Try Simian. It is used for copy-paste-detection in source code (Java, C#, C, C++, COBOL, Ruby, JSP, ASP, HTML, XML, Visual Basic, Groovy), but you can run this on plain text files too. 回答2: There is a Copy-Paste Detection (CPD) project on

How do I get Simian to produce a nice HTML report I can email to everyone on the team?

你离开我真会死。 提交于 2019-12-11 15:43:03
问题 I am trying to discover how great our problem is with duplicate code, therefore I need to be able to mail a nice report (HTML, PDF, or word) to everyone on the team that lists all the duplicates that are found. How do I create such a report? (At this stage, I am just looking for a one-of ad hock solution to help with scoping the problem) (Our codebase is in VB.NET and I am running on Windows 7) 回答1: Personally I would wrote a (Perl|Insert your choice of language here) program that takes the

统计代码重复实践

自古美人都是妖i 提交于 2019-12-05 06:29:45
应用场景 想要知道项目代码中重复代码数,用以优化代码。 代码重复统计 使用工具: Simian ,下载页面地址: https://www.harukizaemon.com/simian/get_it_now.html 。我在MacBook上使用这个工具,所以使用这个工具的Java版本。 扫描Java代码并输出分解结果,分析结果是XML格式,命令: java -jar simian-2.5.10.jar -includes="<路径>/**/*.java" -threshold=10 -formatter=xml:<输出路径>/<文件名>.xml ".rb" /**/*.java 表示扫描目录下的java文件及其子目录下的所有java文件。 打开分析结果文件,找到 <summary> 这个标签,属性totalRawLineCount是原行个数,属性duplicateLineCount是重复行的个数。 来源: https://my.oschina.net/ibuwai/blog/3132549

Tips to show similarities in files

这一生的挚爱 提交于 2019-12-03 12:44:39
In a project, I found some css files that "smell" like there are copy-pasted rules in them. I wonder what are your strategies for detecting copy-paste stuff in files. Just of curiosity i'd like to hear your tips and tricks for showing file similarities! The Chairman Try Simian . It is used for copy-paste-detection in source code (Java, C#, C, C++, COBOL, Ruby, JSP, ASP, HTML, XML, Visual Basic, Groovy), but you can run this on plain text files too. Ed Guiness There is a Copy-Paste Detection (CPD) project on sourceforge; http://pmd.sourceforge.net/cpd.html But even in large projects I find my

统计代码重复实践

落花浮王杯 提交于 2019-11-25 22:04:59
应用场景 想要知道项目代码中重复代码数,用以优化代码。 代码重复统计 使用工具: Simian ,下载页面地址: https://www.harukizaemon.com/simian/get_it_now.html 。我在MacBook上使用这个工具,所以使用这个工具的Java版本。 扫描Java代码并输出分解结果,分析结果是XML格式,命令: java -jar simian-2.5.10.jar -includes="<路径>/**/*.java" -threshold=10 -formatter=xml:<输出路径>/<文件名>.xml ".rb" /**/*.java 表示扫描目录下的java文件及其子目录下的所有java文件。 打开分析结果文件,找到 <summary> 这个标签,属性totalRawLineCount是原行个数,属性duplicateLineCount是重复行的个数。 来源: oschina 链接: https://my.oschina.net/ibuwai/blog/3132549