pylint checker added

This commit is contained in:
lxsameer 2011-06-03 09:00:49 +04:30
parent aa57cbf238
commit 6ae81bdac7
1 changed files with 20 additions and 0 deletions

View File

@ -176,6 +176,26 @@ binding for Kuso IDE django plugin"
(manage-command "*Custom*" "custom" command)
)
(defun pylint-check-current-buffer ()
"Run pylint on current buffer."
(interactive)
(let (cbuffer-file pylint-buffer)
(setq cbuffer-file (buffer-file-name))
(if (string cbuffer-file)
(progn
(setq pylint-buffer (get-buffer-create "*Pylint*"))
(ansi-color-for-comint-mode-on)
(switch-to-buffer pylint-buffer)
(add-hook 'after-change-functions 'buffer-change-colorizing t t)
(setq fullcommand (concat "-f colorized " cbuffer-file))
(setq commandp (apply 'make-comint-in-buffer "pylint" pylint-buffer "pylint" nil (list fullcommand command)))
)
(message "This buffer did not visit any file.")
)
)
)
;; ----------------------------------------------------------------------
;; Minor Modes
;; ----------------------------------------------------------------------