PMD Emacs integration Lisp snippets

24 Oct 2005

Thanks to Nascif Abousalh Neto for updating the PMD Emacs plugin! Here's the big change:

< (defcustom pmd-ruleset-list (list "rulesets/basic.xml")
---
> (defcustom pmd-ruleset-list (list "basic" "braces" "clone" "codesize" "controversial" "coupling"
>                                   "design" "finalizers" "imports" "javabeans" "junit" "logging-java"
>                                   "naming" "optimizations" "strictexception" "strings" "sunsecure"
>                                   "unusedcode" "logging-jakarta-commons")

So now all the rulesets are available in Emacs. It should work fine with PMD 3.3, too.

Also, I barely know Lisp, but this is a nifty little snippet for glomming up the jar files in the lib directory:

>     (concat "\'"
>             (car (directory-files pmd-lib t ".*pmd-.*\\.jar$"))
>             "\'")))

Of course, I prefer Ruby's Dir.glob, but, still, nifty stuff!