การวิเคราะห์ PMD สำหรับไฟล์หลายไฟล์

Aug 18 2020

จะเรียกใช้การวิเคราะห์ pmd สำหรับไฟล์หลาย ๆ ไฟล์ได้อย่างไร ที่นี่หากสมมติว่ามีไฟล์. cls หลายไฟล์ฉันจะรันการวิเคราะห์ไฟล์หลายไฟล์ในครั้งเดียวได้อย่างไร

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

คำตอบ

1 adangel Aug 19 2020 at 07:07

คุณยังสามารถระบุไดเร็กทอรีที่สมบูรณ์และ PMD จะค้นหาไฟล์ใด ๆ ที่มีนามสกุล "* .cls":

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