Created
November 21, 2014 23:53
-
-
Save BJTerry/67c4587761cd6a483d77 to your computer and use it in GitHub Desktop.
A flycheck checker for python with prospector
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
(flycheck-define-checker python-prospector | |
"A Python syntax and style checker using Prospector. | |
See URL `http://prospector.readthedocs.org/en/latest/index.html'." | |
:command ("prospector" "-s" "medium" "-M" "-o" "emacs" | |
source) | |
:error-patterns | |
((error line-start | |
(file-name) ":" (one-or-more digit) " :" (optional "\r") "\n" | |
(one-or-more " ") "L" line ":" column | |
(message (minimal-match (one-or-more not-newline)) "E" (one-or-more digit) (optional "\r") "\n" | |
(one-or-more not-newline)) (optional "\r") "\n" line-end) | |
(warning line-start | |
(file-name) ":" (one-or-more digit) " :" (optional "\r") "\n" | |
(one-or-more " ") "L" line ":" column | |
(message (minimal-match (one-or-more not-newline)) "W" (one-or-more digit) (optional "\r") "\n" | |
(one-or-more not-newline)) (optional "\r") "\n" line-end) | |
(warning line-start | |
(file-name) ":" (one-or-more digit) " :" (optional "\r") "\n" | |
(one-or-more " ") "L" line ":" column | |
(message (minimal-match (one-or-more not-newline)) (not digit) (one-or-more digit) (optional "\r") "\n" | |
(one-or-more not-newline)) (optional "\r") "\n" line-end)) | |
:modes python-mode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment