Now back to current version

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@3942 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Tom Copeland
2005-10-25 00:41:49 +00:00
parent 3f8df72b8e
commit 6bb4236db9

View File

@ -56,6 +56,9 @@
;; Change History
;; 10/21/2005 0.6: Nascif A. Abousalh-Neto
;; - Updated to work with PMD 3.3
;; 06/16/2004 0.5: Nascif A. Abousalh-Neto
;; - Tested with PMD 1.08
;; - fixed dependency on missing defun
@ -96,7 +99,11 @@
:type 'directory
:group 'pmd)
(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")
"A list of Rulesets to apply. Rulesets are specified in XML files inside the \"rulesets\" subdirectory of the main PMD jar file."
:type '(repeat (file :tag "Ruleset"))
:group 'pmd)
@ -139,8 +146,10 @@
(defun pmd-classpath ()
(let* ((path-separator (if (eq system-type 'windows-nt) ";" ":"))
(path-slash (if (eq system-type 'windows-nt) "\\" "/"))
(pmd-etc (concat pmd-home "etc"))
(pmd-lib (concat pmd-home path-slash "lib" path-slash)))
(concat "\'"
pmd-etc path-separator
(mapconcat
(lambda (path)
path)
@ -148,6 +157,15 @@
path-separator)
"\'")))
(defun pmd-jar ()
(let* ((path-separator (if (eq system-type 'windows-nt) ";" ":"))
(path-slash (if (eq system-type 'windows-nt) "\\" "/"))
(pmd-etc (concat pmd-home "etc"))
(pmd-lib (concat pmd-home path-slash "lib" path-slash)))
(concat "\'"
(car (directory-files pmd-lib t ".*pmd-.*\\.jar$"))
"\'")))
;; (defun pmd-file-or-dir (target)
;; "Run PMD on the given target (file or dir)"
;; (if (eq (count-windows) 1)
@ -175,7 +193,7 @@
"Run PMD on the given target (file or dir)"
(let ((pmd-command
(concat pmd-java-home " -classpath " (pmd-classpath) " net.sourceforge.pmd.PMD "
(concat pmd-java-home " -jar " (pmd-jar) " "
target " emacs " (mapconcat (lambda (path) path) pmd-ruleset-list ","))))
;; Force save-some-buffers to use the minibuffer