Files
pmd/pmd-emacs/src/elisp/pmd.el
David Dixon-Peugh 974c6c9f21 Initial revision
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@362 51baf565-9d33-0410-a72c-fc3788e3496d
2002-07-15 21:28:10 +00:00

31 lines
749 B
EmacsLisp
Executable File

(defgroup pmd nil "PMD"
:group 'emacs)
(defcustom pmd-java-home "/usr/local/bin/java"
"Java binary to run PMD with."
:type 'file
:group 'pmd )
(defcustom pmd-home "~/pmd"
"Directory where PMD is installed."
:type 'directory
:group 'pmd)
(defcustom pmd-rulesets "rulesets/basic.xml"
"Rulesets to apply"
:type 'string
:group 'pmd)
(defun pmd-current-buffer ()
"Run PMD on the contents of the current buffer."
(interactive)
(let ((file-name (buffer-file-name) )
(pmd-buffer-create (get-buffer "*PMD*"))
(pmd-jar (concat pmd-home "/lib/pmd-0.4.jar")))
(shell-command (concat pmd-java-home " -cp " pmd-jar
" net.sourceforge.pmd.PMD "
file-name " xml " pmd-rulesets ))))
(provide 'pmd)