如何从命令行执行 Google Codepro analytix?
是否可以从命令行运行 Google CodePro analytix。
我正在寻找的是从 shell 脚本运行它,传递文件名作为参数,并获取我作为参数传递的文件名在文件级别生成的所有指标。
可以这样做吗?以及如何?
是否有其他工具可以为 Java 文件提供相同的指标并从 shell 脚本执行?
Is it possible to run Google CodePro analytix from Command Line.
What I am looking for is to run this from a shell script passing the file name as a parameter and get all the metrics generated on file level for the filename I passed in as parameter.
Is it possible to do so? and How?
Are there any other tools that can give same metrics for a Java file and be executed from a shell script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有一组codepro ant 任务集,可以用于审计以及报告生成。
至于其他工具,还有PMD 的 ant 任务集以及maven 的 PMD 插件。两者都可以从命令行运行。
与 Findbugs 类似:ant 任务的说明可以在 此处 找到,还有 Maven 插件此处
编辑:在我看来,谷歌购买这个漂亮的工具只是为了让它消亡的默默无闻。似乎没有正在进行的开发,也没有开源版本。 ant任务没有发布(我没有找到可用的例子)。没有maven插件。我们无法将其集成到我们的构建中,并重新使用 PMD、Findbugs 和 Sonar。这是一个耻辱。
There is a set of codepro ant tasks that can be used for auditing as well as report generation.
As to other tools, there is also a set of ant tasks for PMD as well as a PMD plugin for maven. Both can be run from command line.
Similar for Findbugs : the instructions for the ant task can be found here, and the maven plugin here
EDIT: It seems to me that google purchased this beatiful tool just to let it die of obscurity. There seems to be no ongoig development and no release to open source. The ant tasks are not released (and I have found no usable examples). there is no maven plugin. We were unable to integrate it in our build and are back to using PMD, Findbugs and Sonar. It's a shame.
Google CodePro Analytix 应该有一个 Ant 任务,它应该是命令行实用程序执行所需操作的地方。
Google CodePro Analytix should have an Ant task, it should be the place where a command-line utility would do the desired action.
CodePro Analytix 确实有 ant 任务并且它们很实用。请参阅此处的文档。
https://developers.google.com/java-dev -tools/codepro/doc/features/ant/headless - 即使第一行说任务已弃用,它仍然有效。
ant 任务 codepro.audit 和 codepro.metrics 都可以与 Eclipse Juno 配合良好。通过编辑 https://developers.google.com/java-dev-tools/codepro/doc/features/ant/example/headless_existing_workspace_33.zip
我编辑了默认的 headless.xml 以使用特定的规则/指标集并以 xml 格式导出结果。
CodePro Analytix does have ant tasks and they are functional. Please see the documentation here.
https://developers.google.com/java-dev-tools/codepro/doc/features/ant/headless - It works even though the first line says the tasks are deprecated.
Both ant tasks codepro.audit and codepro.metrics works fine with Eclipse Juno. I was able to run both audit and metrics tasks on an existing workspace project by editing headless.xml and run_headless.bat files from https://developers.google.com/java-dev-tools/codepro/doc/features/ant/example/headless_existing_workspace_33.zip
I edited the default headless.xml to use a specific rule/metric set and to export the results in xml format.