« People Do Learn | Main | NetBeans 4.0 and Swing Themes »

PMD/NetBeans config

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:
http://pmd.sourceforge.net/xref/net/sourceforge/pmd /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.

Comments (2)

Ole-Martin Mk:

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 http://pmd.sf.net


well the problemDepth is not read-only. If have to double-click on the value "3" and then edit it.

Post a comment


This page contains a single entry from the blog posted on January 20, 2003 8:33 AM.

The previous post in this blog was People Do Learn.

The next post in this blog is NetBeans 4.0 and Swing Themes.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33