sfpowerscripts logo sfpowerscripts

This task is used to run a static analyis of the apex classes in a project directory using PMD. This is a task execution wrapper around the command sfpowerkit:source:pmd which you can read here


Please  note Install SFDX with Sfpowerkit  task is added to the pipeline before utilizing this task

Task Snapshot

This task attaches the code analysis result into the build artifacts and also provides a timeline update in the build summary page. Please note this enahancement only works with ‘Classic’ pipelines only

This task when used in a build pipeline features a report window that gets displayed along with the logs. Please note there



Task Version and Details

id: sfpwowerscripts-analyzewithpmd-task

version: 5.0.9

Input Variables

The directory that needs to be analyzed, If ignored, the sfpowerkit plugin will pickup the default directory mentioned in the sfdx-project.json.

sfpowerkit comes with a default ruleset, Select the picklist to ‘custom’ if you want to utilize your own ruleset

If you select a custom ruleset option, provide the ruleset path for PMD

Select the format for the code analysis report to be generated, All the options as of PMD 6.18.0 are supported

Provide the name or path to the file if you want the report to be saved to a particular location, Ignoring it will result in using the default options as of sfpowerkit. Irrespective of this, the result of PMD analysis will be uploaded into the build artifacts

Select this option if you want the build to be failed, if PMD observes any critical defects in the code being analyzed

Output Variables

Control Options