Skip to content

[apex] Failing PMD scans on rulesets with reference to category/apex/performance.xml/OperationWithHighCostInLoop #4737

Closed as not planned

Description

@BrundaSreedhar

Affects PMD Version:
7.0.0-rc4

Description:
We're running pmd scans on the apex default ruleset and the scan fails

Exception Stacktrace:

<rule ref="category/apex/performance.xml/OperationWithHighCostInLoop" message="Avoid operations in loops that can impact performances">

^^^^^ Unable to find referenced rule OperationWithHighCostInLoop; perhaps the rule name is misspelled?

 <priority>3</priority>

 </rule>
[main] ERROR net.sourceforge.pmd.cli - Cannot load ruleset /tmp/ruleset: An XML validation error occurred

[main] WARN net.sourceforge.pmd.cli - Progressbar rendering conflicts with reporting to STDOUT. No progressbar will be shown. Try running with argument -r <file> to output the report to a file instead.
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.<anonymous> (/app/main.js:3:24)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain]

Steps to reproduce:

run PMD scan with the default apex ruleset on an apex class.

Running PMD through: CLI

Activity

  1. added
    a:bug
    on Nov 3, 2023
  2. jsotuyod commented on Nov 3, 2023

    @jsotuyod
    Member

    @BrundaSreedhar the referenced rule has just been merged into master last week (see #4677) and is still unreleased. The RC4 doesn't include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions