多个文件的PMD分析 [英] PMD analysis for multiple files

查看:76
本文介绍了多个文件的PMD分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何对多个文件运行pmd分析?如果假设这里有多个.cls文件,那么我如何一次对多个文件进行分析?

How to run pmd analysis for multiple files? here if for suppose there are multiple .cls files , then how can I run analysis on multiple files in single time?

pmd.bat -d $(Build.SourcesDirectory)\ code\src\apexcode.cls -f xml -R $(Build.SourcesDirectory)\代码\build\MyApexRule.xml -reportfile pmd.xml

pmd.bat -d "$(Build.SourcesDirectory)\code\src\apexcode.cls" -f xml -R "$(Build.SourcesDirectory)\code\build\MyApexRule.xml" -reportfile pmd.xml

推荐答案

您还可以指定完整目录,PMD将使用 * .cls搜索任何文件。扩展名:

You can also specify complete directories and PMD will search for any files with "*.cls" extension:

pmd.bat -d "$(Build.SourcesDirectory)\code\src" -f xml ^
    -R "$(Build.SourcesDirectory)\code\build\MyApexRule.xml" ^
    -reportfile pmd.xml

另请参阅 https://pmd.github.io/latest/pmd_userdocs_cli_reference.html 有关CLI标志的完整文档。

See also https://pmd.github.io/latest/pmd_userdocs_cli_reference.html for the complete documentation of the CLI flags.

这篇关于多个文件的PMD分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆