PMD/NetBeans config
  Posted January 20, 2003    PermaLink    Comments (1)  

My little nit on PMD got some notice,

...the "deeply nested if statements rule" can now be configured to trigger only after hitting a certain depth: /rules/AvoidDeeplyNestedIfStmtsRule.html
It's a bit of a pain to configure, since you have to edit the rulesets/design.xml file and change the "problemDepth" property, but, anyhow, it works :-)

Well, it works for stand alone running, but inside of netbeans it is not configurable...


That cell in the table is un-editable, so I cannot change the depth. It's sitting there, taunting me and laughing at me! (OK, maybe not, I should reduce the caffine intake and get some more sleep). It's really funny it tells you what the optuion is but it won't let you chagne it. I've even tried looking for the pmd module configurations and for those rules.xml files but i cannot find them for the life of me. So I just don't care about that rull and throw it out.

However, the ant task looks to be editable (at least according to t he docs), so it is integratable to a build process easier. I could just create an at task shortcut to run it, and we can keep the rules files in the source control tree, so we get consistent results.

Trackback URL
  TrackBack URL for this entry:
Name:Ole-Martin Mørk
Date:January 22, 2003 08:49 AM

Hi, I made that netbeans module, and it's true, the properties are readonly now.
I hope to change that bit in a later version. We'll see...
For now, you have to open the pmd-1.01.jar file under modules/ext (it's either located in you home directory under .netbeans or in the netbeans installation directory, depending on how you installed pmd-netbeans module), edit the ruleset.xml, repackage the jar, restart netbeans, and go on.

If you, or anyone else, have some feature requests for the netbeans module, don't hesitate to report the at

Post Comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Remember me?

Email Address: