多个文件的PMD分析

PMD analysis for multiple files

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

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

您也可以指定完整的目录,PMD 将搜索任何扩展名为“*.cls”的文件:

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

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