There's now a PMD plugin for TextPad...

Usage tips, posted by users. No questions here please.

Moderators: AmigoJack, helios, bbadmin, Bob Hansen, MudGuard

Post Reply
tcopeland
Posts: 2
Joined: Tue Oct 07, 2003 3:01 pm

There's now a PMD plugin for TextPad...

Post by tcopeland »

.....thanks to Jeff Epstein. PMD is a Java source code analyzer. It finds
unused variables, empty catch blocks, unnecessary object creation, and so
forth.

Folks can download the latest version of PMD here:

http://sourceforge.net/project/showfile ... p_id=56262

and instructions on hooking up TextPad to PMD are here:

http://pmd.sourceforge.net/integrations.html

Yours,

Tom
tcopeland
Posts: 2
Joined: Tue Oct 07, 2003 3:01 pm

Re: There's now a PMD plugin for TextPad...

Post by tcopeland »

tcopeland wrote:PMD is a Java source code analyzer. It finds
unused variables, empty catch blocks, unnecessary object creation, and so
forth.
Folks can download the latest version of PMD here:
http://sourceforge.net/project/showfile ... p_id=56262
and instructions on hooking up TextPad to PMD are here:
http://pmd.sourceforge.net/integrations.html
A new version of PMD is out - v3.3 - with seven new rules, better JDK 1.5 support, and speed improvements. Among the new rules is UnnecessaryLocalBeforeReturn, which finds code like this:

Code: Select all

  public class Foo {
    public int foo() {
      int x = doSomething();
      return x;  // instead, just 'return doSomething();'
    }
  }
And of course it still works with Textpad. Furthermore, the integration is a bit simpler since you don't have to type the entire ruleset name - rather than type "rulesets/unusedcode.xml" you can just type "unusedcode". Saves a few keystrokes, anyhow.

Questions/comments are welcome!

Yours,

Tom

P.S. Using PMD? Get the book - "PMD Applied"!
Post Reply