Describe the bug
Even though PMD provides a mechanism to relativize paths (see --relativize-paths-with in docs) however that's not being passed down by scanner which means that reports will come out referencing files with absolute paths.
We'd like to store the results with our code (to keep track of progress, calculate detas vs. some baseline, for example) and this makes it impossible if you have a team sharing the code or would cause problems if the project changes location.
To Reproduce
Steps to reproduce the behavior:
sfdx scanner:run --engine=pmd --target=force-app/main/default/classes/SomeClass.cls --pmdconfig=scanner/some-rule-set.xml --format=json
Expected behavior
We'd expect to only see relative paths in the reports. We'd like to be able to either provide the --relativize-paths-with argument or equivalent mechanism where the scanner could itself figure out the root path and pass it down to PMD.
Desktop (please complete the following information):
OS: macOS
Scanner Version @salesforce/sfdx-scanner 3.16.0
Additional context
"Workaround": N/A
"Urgency": Kind of "Business stopping". We want to integrate the scanner as part of our workflows but since we have a ton of code already (which has passed security review a few times) we'd like to focus only on new/modified code and we rely on an external mechanism to create and compare reports from a "baseline".
Describe the bug Even though PMD provides a mechanism to relativize paths (see
--relativize-paths-with
in docs) however that's not being passed down by scanner which means that reports will come out referencing files with absolute paths.We'd like to store the results with our code (to keep track of progress, calculate detas vs. some baseline, for example) and this makes it impossible if you have a team sharing the code or would cause problems if the project changes location.
To Reproduce Steps to reproduce the behavior:
sfdx scanner:run --engine=pmd --target=force-app/main/default/classes/SomeClass.cls --pmdconfig=scanner/some-rule-set.xml --format=json
Expected behavior We'd expect to only see relative paths in the reports. We'd like to be able to either provide the
--relativize-paths-with
argument or equivalent mechanism where the scanner could itself figure out the root path and pass it down to PMD.Desktop (please complete the following information):
Additional context
"Workaround": N/A
"Urgency": Kind of "Business stopping". We want to integrate the scanner as part of our workflows but since we have a ton of code already (which has passed security review a few times) we'd like to focus only on new/modified code and we rely on an external mechanism to create and compare reports from a "baseline".