Created
October 14, 2012 13:35
-
-
Save pagles/3888616 to your computer and use it in GitHub Desktop.
flake8 and flymake integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; flake8 and flymake integration | |
(when (load "flymake" t) | |
(defun flymake-flake8-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) | |
(list "flake8" (list local-file)))) | |
(add-to-list 'flymake-allowed-file-name-masks | |
'("\\.py\\'" flymake-flake8-init))) | |
(add-hook 'find-file-hook 'flymake-find-file-hook) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment