PMD Salesforce is not highlighting warnings for rules running on priority 5

Issue #2232 resolved
Latika Kharbanda created an issue

The PMD Salesforce no longer highlights warning for the rules which have the priority of 5. If I change the priority of the rule from 5 to anything else, I am able to see the warning. The minimum rule priority is set to ‘Low’.

Comments (6)

  1. Scott Wells repo owner

    Hi. What is the inspection setting for minimum rule priority?

    To show priority 5 it must be set to Low.

  2. Scott Wells repo owner

    Gotcha. Yeah, I was able to reproduce the same behavior, and it seems to be an issue with PMD itself. I can see the response from PMD#processFiles and it doesn’t include any reported violations when the minimum rule priority is set to the lowest value AND there are rules reported at that same priority that should produce violations in a given file.

    I’ll log an issue with them and see whether this is a bug on their side or something IC2 is doing wrong when calling PMD. I’ll report the findings here as appropriate.

  3. Scott Wells repo owner

    Nope, this is an IC2 issue…two issues, actually. First, IC2 isn’t including the minimum rule priority in its composite cache key. The workaround for that would be to close and reopen the project if you’d just made a change to the minimum rule priority. That’s not likely what you’re seeing, though. The second issue is that IC2 is reporting level 5 violations at the information-level which isn’t displayed by default. So the violation is there but not visible.

    I’ll address both of these for this week’s build. Thanks for bringing this to my attention!

  4. Log in to comment