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:
@ -56,6 +56,9 @@
|
|||||||
|
|
||||||
;; Change History
|
;; 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
|
;; 06/16/2004 0.5: Nascif A. Abousalh-Neto
|
||||||
;; - Tested with PMD 1.08
|
;; - Tested with PMD 1.08
|
||||||
;; - fixed dependency on missing defun
|
;; - fixed dependency on missing defun
|
||||||
@ -96,7 +99,11 @@
|
|||||||
:type 'directory
|
:type 'directory
|
||||||
:group 'pmd)
|
: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."
|
"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"))
|
:type '(repeat (file :tag "Ruleset"))
|
||||||
:group 'pmd)
|
:group 'pmd)
|
||||||
@ -139,8 +146,10 @@
|
|||||||
(defun pmd-classpath ()
|
(defun pmd-classpath ()
|
||||||
(let* ((path-separator (if (eq system-type 'windows-nt) ";" ":"))
|
(let* ((path-separator (if (eq system-type 'windows-nt) ";" ":"))
|
||||||
(path-slash (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)))
|
(pmd-lib (concat pmd-home path-slash "lib" path-slash)))
|
||||||
(concat "\'"
|
(concat "\'"
|
||||||
|
pmd-etc path-separator
|
||||||
(mapconcat
|
(mapconcat
|
||||||
(lambda (path)
|
(lambda (path)
|
||||||
path)
|
path)
|
||||||
@ -148,6 +157,15 @@
|
|||||||
path-separator)
|
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)
|
;; (defun pmd-file-or-dir (target)
|
||||||
;; "Run PMD on the given target (file or dir)"
|
;; "Run PMD on the given target (file or dir)"
|
||||||
;; (if (eq (count-windows) 1)
|
;; (if (eq (count-windows) 1)
|
||||||
@ -175,7 +193,7 @@
|
|||||||
"Run PMD on the given target (file or dir)"
|
"Run PMD on the given target (file or dir)"
|
||||||
|
|
||||||
(let ((pmd-command
|
(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 ","))))
|
target " emacs " (mapconcat (lambda (path) path) pmd-ruleset-list ","))))
|
||||||
|
|
||||||
;; Force save-some-buffers to use the minibuffer
|
;; Force save-some-buffers to use the minibuffer
|
||||||
|
Reference in New Issue
Block a user