diff options
author | Tom Willemsen | 2013-02-06 11:48:18 +0100 |
---|---|---|
committer | Tom Willemsen | 2013-02-06 11:48:25 +0100 |
commit | c3aa5bb8b4b3e900037ac31a0c8006147ea68f10 (patch) | |
tree | a91a7a46b2e17442125cfa8d4613b6d8375fae15 /.emacs.d/init.org | |
parent | ec68e364d98302344fcf1f4f574519a6dfe86678 (diff) | |
download | dotfiles-c3aa5bb8b4b3e900037ac31a0c8006147ea68f10.tar.gz dotfiles-c3aa5bb8b4b3e900037ac31a0c8006147ea68f10.zip |
emacs: Use flycheck for python
Diffstat (limited to '.emacs.d/init.org')
-rw-r--r-- | .emacs.d/init.org | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 5edf00e..9070798 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -206,6 +206,29 @@ "Access to a protected member")))) #+END_SRC + After loading ~flycheck~ Remove the default python checkers and + replace them with my own, which tries both ~flake8~ and ~pylint~. + + #+BEGIN_SRC emacs-lisp :tangle init2.el + (eval-after-load "flycheck" + '(progn + (flycheck-declare-checker python-pycheck + "Uses pycheck.sh to check for errors/warnings." + :command '("pycheck.sh" source-inplace) + :error-patterns + '(("^\\(?1:.*\\):\\(?2:[0-9]+\\): Warning (W.*): \\(?4:.*\\)$" warning) + ("^\\(?1:.*\\):\\(?2:[0-9]+\\): Error (E.*): \\(?4:.*\\)$" error) + ("^\\(?1:.*\\):\\(?2:[0-9]+\\): \\[F\\] \\(?4:.*\\)$" error) + ("^\\(?1:.*?\\):\\(?2:[0-9]+\\):\\(?:\\(?3:[0-9]+\\):\\)? \\(?4:E[0-9]+.*\\)$" error) + ("^\\(?1:.*?\\):\\(?2:[0-9]+\\):\\(?:\\(?3:[0-9]+\\):\\)? \\(?4:W[0-9]+.*\\)$" warning) + ("^\\(?1:.*\\):\\(?2:[0-9]+\\): \\(?4:.*\\)$" error)) + :modes 'python-mode) + + (mapc (lambda (c) (delete c flycheck-checkers)) + '(python-flake8 python-pylint python-pyflakes)) + (add-to-list 'flycheck-checkers 'python-pycheck))) + #+END_SRC + ** Eshell Add ~unison~ to the list of =eshell-visual-commands= because it |