summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs.d/init.el24
1 files changed, 7 insertions, 17 deletions
diff --git a/emacs.d/init.el b/emacs.d/init.el
index 0408dd6..13ed7e0 100644
--- a/emacs.d/init.el
+++ b/emacs.d/init.el
@@ -173,26 +173,16 @@
       :init
       (flycheck-pos-tip-mode))
 
+    (use-package flycheck-twitter-python-style
+      :load-path (lambda () (expand-file-name  "~/src/flycheck-twitter-python-style.el/")))
+
     (add-hook 'prog-mode-hook 'flycheck-mode)
+
+    (flycheck-twitter-python-style-setup)
+
     (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
     (setq flycheck-highlighting-mode 'lines)
-    (setq flycheck-check-syntax-automatically '(mode-enabled save))
-
-    (defun check-source-predicate ()
-      (and (executable-find "check.pex")
-           (buffer-file-name)
-           (string-match "src/source/.*\.py$" (buffer-file-name))))
-
-    ;;; errors are reported like this:
-    ;;; E241:ERROR   <file name>:<line> <message>
-    (flycheck-define-checker source-check
-      "A syntax checker for python source code in Source, using `check.pex'"
-      :command ("check.pex" source)
-      :error-patterns ((error line-start (id (1+ nonl)) ":ERROR" (1+ nonl) ":" line (message) line-end)
-                       (warning line-start (id (1+ nonl)) ":WARNING" (1+ nonl) ":" line (message) line-end))
-      :predicate check-source-predicate
-      :modes (python-mode))
-    (add-to-list 'flycheck-checkers 'source-check)))
+    (setq flycheck-check-syntax-automatically '(mode-enabled save))))
 
 (use-package flyspell
   ;; check the spelling