Menu

#1132 plugin does not execute custom xpath rules

Eclipse-Plugin
closed
None
Eclipse
2-Critical
Bug
4.0.1.v20130811
2013-10-31
2013-09-13
No

Plugin will run a local project ruleset but does not execute any custom xpath rules. The standard PMD rules will be run but no custom rules appear to be executed. This used to work in previous versions.

1 Attachments

Related

Discussion: PMD Does Not Respect Eclipse Settings
Discussion: Migration Problems (Maven, Eclipse plugin)

Discussion

  • Scott Bartram

    Scott Bartram - 2013-09-13

    I forgot to add that the project ruleset file works fine from the command line and does execute the custom xpath rules.

     
  • Michael Pini

    Michael Pini - 2013-10-01

    Can confirm this behaviour, custom rules (or even only renamed rules) get ignored in Eclipse, but work fine with command line/ant.

     
  • Andreas Dangel

    Andreas Dangel - 2013-10-01

    Can you check, which rules you have enabled in the workspace preferences?

    Window -> Preferences -> PMD -> Rule Configuration
    

    If I remember correctly, the PMD plugin uses only the rules, that are enabled there.
    It is debatable though, whether this is correct behavior or not...

     
  • Michael Pini

    Michael Pini - 2013-10-02

    right, when I import my custom rules there and then use my local rulefile it works, thanks! :)

    But isn't this the reason for a local ruleset for the project, to not depend on global settings?

     

    Last edit: Michael Pini 2013-10-02
  • Scott Bartram

    Scott Bartram - 2013-10-02

    IMHO, this is a serious regression from previous behavior. We have dozens of projects and each project autogenerates its own custom rules using maven. With this change, users will have to manually import custom rules from every project into the global list before they will execute.

     
  • Andreas Dangel

    Andreas Dangel - 2013-10-14

    Alright, it seems that this bug was actually meant to be a feature:

    • Rule activation checkboxes now operational - only the checked rules are used to evaluate code. No longer need to physically remove rules from the ruleset to bypass them.
    • new ability to enable/disable rules without removing them from rulesets

    So, the goal is, to disable specific rules temporarily. But, of course, if you use custom rules, they are not in this global list and hence not activated.

    Would it make sense, to change the behavior in that way, that by default every rule is activated and you need to explicitly disable rules if you want to use this feature? For custom rules this means, you would need to import these into the global rules preferences, if you want to disable them.

    What do you think?

     
  • Andreas Dangel

    Andreas Dangel - 2013-10-14
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> Eclipse-Plugin
     
  • Andreas Dangel

    Andreas Dangel - 2013-10-31
    • status: open --> closed
     
  • Andreas Dangel

    Andreas Dangel - 2013-10-31

    Fixed with 4.0.2.v20131031-1124.
    See Release Notes

     

Log in to post a comment.