Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some PMD parameters not working #13

Open
cfbermudez opened this issue May 6, 2022 · 0 comments
Open

Some PMD parameters not working #13

cfbermudez opened this issue May 6, 2022 · 0 comments

Comments

@cfbermudez
Copy link

I'm not completely sure if this is an issue or if I am doing something wrong here.

I'm using this code:

# Setup pmd
- name: 'Setup PMD'
    uses: sfdx-actions/setup-pmd@v1

# Checkout the code
- name: 'Checkout source code'
    uses: actions/checkout@v2

# Run PMD Analysis
- name: 'Run PMD'
    run: |
        pmd -d ./force-app/main/default/ -R ./config/pmd-ruleset.xml -failOnViolation false -f html -shortnames -P linkPrefix="/some/path/" -P linePrefix="L" -reportfile ./ReportPMD.html

# Upload PMD report as an artifact
- name: 'Upload PMD report'
    uses: actions/upload-artifact@v3
    with:
    name: PMD-Apex-Report
    path: ./ReportPMD.html

It works just fine, I got the report in the GitHub action artifacts section.

But the HTML report is not considering the -shortnames -P linkPrefix="/some/path/" -P linePrefix="L" parameters.

The report looks like this:
image

The report shows an entire path for the File Column ignoring the -shortnames parameter.
The File Colmun also should be a link to "/some/path/", specified in -P linkPrefix="/some/path/"
The Line Number should be an L#, specified in -P linePrefix="L"

Am I missing something?

Thanks!

PD, Is it possible to update or define the PMD version used? How Can I do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant