问题描述
如何对多个文件运行pmd分析?如果假设有多个.cls文件,那么我如何一次对多个文件进行分析?
pmd.bat -d“ $(Build.sourcesDirectory)\ code \ src \ apexcode.cls” -f xml -R“ $(Build.sourcesDirectory)\ code \ build \ MyApexRule.xml” -reportfile 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。