Menu

#729 Customizing Rules of PMD

PMD-Backlog
open
5
2012-10-21
2007-10-17
rxjain
No

Hi,

I am using JDK 1.5, Eclipse 3.2 and PMD 3.2.2.

I wanted to customize rules of PMD for my project, so I created my own ruleset.xml. And then I cleared all the rules from Window-> Preferences -> PMD -> Rules Configuration and imported the new rules from the ruleset.xml file created by me. After this I checked my code with PMD and it showed some violations which were relevant to the new ruleset.. So Far So Good .......... ..

Now I made a small change in the code to make some changes in the violations, and the PMD started showing weird behavior. It wasnt reflecting any changes in the violations and it went on showing the old violations. So then just to check, I imported the ruleset again and did everything again, but still it wasnt reflecting those changes. Moreover it shows the changes in the violations for some changes sometime, which is so strange. Can someone please tell me what is the origin of the problem and how to resolve it ?

Thanks in anticipation

Discussion

  • Tom Copeland

    Tom Copeland - 2007-10-17

    Logged In: YES
    user_id=5159
    Originator: NO

    You may want to post this question on the forums... there's more chance of folks seeing and responding to it there...

    Yours,

    Tom

     
  • Ryan Gustafson

    Ryan Gustafson - 2008-02-28

    Logged In: YES
    user_id=342470
    Originator: NO

    There are some issues with changes to the Workspace rules not being fully propagated to the Project settings. You can tell if this is the case if the following works:

    1) Change the Workspace settings you want.
    2) Change the Project settings you want.
    3) Restart eclipse.
    4) Clear the PMD violations.
    5) Recheck the PMD violations.

    Can you verify if this works for you?

    If things look good after this, you've hit one of those problems. They'll be fixed eventually, and I would consider this defect a duplicate of the know defects.

    Thanks,
    Ryan

     

Log in to post a comment.