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

Custom ruleset not working after the update #169

Open
anukacjay opened this issue Jun 26, 2024 · 1 comment
Open

Custom ruleset not working after the update #169

anukacjay opened this issue Jun 26, 2024 · 1 comment

Comments

@anukacjay
Copy link

Describe the bug
After the updating to version 7.0.0 the I get an error when running the custom ruleset.

Apex PMD Output
stderr:[ERROR] Cannot load ruleset category/vf/security.xml/VfCsrf: Cannot resolve rule/ruleset reference 'category/vf/security.xml/VfCsrf'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath.
Failed Exit Code: 1

Apex PMD Settings

  • pmdBinPath:
  • rulesets:
  • additionalClassPaths:

Apex File

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • OS: Windows 11
  • vscode:
@adangel
Copy link
Collaborator

adangel commented Jun 27, 2024

The update from PMD 6 to PMD 7 is a major version change.
Please check out https://docs.pmd-code.org/latest/pmd_userdocs_migrating_to_pmd7.html for the necessary changes.

According to your error message, this section is relevant for you:
https://docs.pmd-code.org/latest/pmd_userdocs_migrating_to_pmd7.html#approaching-700

If you use Visualforce, then you need to change “vf” to “visualforce”, e.g. category/vf/security.xml ➡️ category/visualforce/security.xml

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

2 participants