Skip to content

Instantly share code, notes, and snippets.

@pagles
Created October 14, 2012 13:35
Show Gist options
  • Save pagles/3888616 to your computer and use it in GitHub Desktop.
Save pagles/3888616 to your computer and use it in GitHub Desktop.
flake8 and flymake integration
;; 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