多个文件的PMD分析 [英] PMD analysis for multiple files
问题描述
如何对多个文件运行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屋!