summary refs log tree commit diff
path: root/emacs.d/core/core-flycheck.el
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs.d/core/core-flycheck.el55
1 files changed, 0 insertions, 55 deletions
diff --git a/emacs.d/core/core-flycheck.el b/emacs.d/core/core-flycheck.el
deleted file mode 100644
index 11bb20b..0000000
--- a/emacs.d/core/core-flycheck.el
+++ /dev/null
@@ -1,55 +0,0 @@
-(use-package flycheck
-  :ensure t
-  :defer t
-  :preface (progn
-             (defun check-source-predicate ()
-               (and (executable-find "check.pex")
-                    (buffer-file-name)
-                    (string-match "src/source/.*\.py$" (buffer-file-name)))))
-  :init
-  (progn
-    (add-hook 'prog-mode-hook 'flycheck-mode)
-    (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc)))
-  :config
-  (progn
-    (setq flycheck-mode-line
-      '(:eval
-        (pcase flycheck-last-status-change
-          (`not-checked nil)
-          (`no-checker (propertize " -" 'face 'warning))
-          (`running "")
-          (`errored (propertize " ✘" 'face 'error))
-          (`finished
-           (if flycheck-current-errors
-               (let* ((error-counts (flycheck-count-errors flycheck-current-errors))
-                      (no-errors (cdr (assq 'error error-counts)))
-                      (no-warnings (cdr (assq 'warning error-counts)))
-                      (flycheck-face (cond (no-errors 'error)
-                                           (no-warnings 'warning))))
-                 (propertize (format " [✗:%s/%s]" (or no-errors 0) (or no-warnings 0)) 'face flycheck-face))
-             (propertize " [✓]" 'face 'success)))
-          (`interrupted " -")
-          (`suspicious '(propertize " ?" 'face 'warning)))))
-
-    (setq flycheck-puppet-lint-rc "/Users/fcuny/src/twitter-ops/utilities/puppet/.puppet-lint.rc")
-
-    (flycheck-define-checker source-check
-      "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 check-source-predicate
-      :modes (python-mode))
-    (add-to-list 'flycheck-checkers 'source-check)))
-
-(use-package flycheck-pos-tip
-  :defer t
-  :init
-  (progn
-    (eval-after-load 'feature-flycheck
-      '(setq-default flycheck-display-errors-function #'flycheck-pos-tip-error-messages)))
-  :ensure t)
-
-(provide 'core-flycheck)