blob: 4c76d09f5abece41706ae4e93809d6424b29c684 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
(require 'fcuny-common)
(use-package flycheck
:ensure t
:hook (prog-mode . flycheck-mode )
:custom ((flycheck-idle-change-delay 2)
(flycheck-emacs-lisp-load-path 'inherit)
(flycheck-highlighting-mode 'lines)
(flycheck-check-syntax-automatically '(mode-enabled save)))
:config
(progn
(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
(flycheck-define-checker fcuny/source-check-python
"A syntax checker for python source code in Source, using `check.pex'"
:command ("check.pex" source)
;;; errors are reported like this:
;;; E241:ERROR <file name>:<line> <message>
: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 fcuny/check-source-predicate-python-p
:modes (python-mode))
(add-to-list 'flycheck-checkers 'fcuny/source-check-python)))
(use-package flycheck-pos-tip
:after flycheck
:ensure t
:config
(flycheck-pos-tip-mode))
(provide 'fcuny-flycheck)
|