2018-02-25 17:42:56 +03:00
|
|
|
(require 'flycheck)
|
|
|
|
|
|
|
|
(flycheck-define-checker carp-checker
|
2018-02-19 16:36:39 +03:00
|
|
|
"A Carp syntax checker.
|
|
|
|
|
|
|
|
See URL `http://github.com/carp-lang/Carp/'."
|
2018-02-25 17:42:56 +03:00
|
|
|
:command ("carp" "--check" source)
|
2018-02-26 14:25:16 +03:00
|
|
|
:error-patterns ((error line-start space (message) "\n At line " line ", column " column " in '" (file-name) "'" line-end)
|
|
|
|
(error line-start (file-name) ":" line ":" column " " (message) line-end))
|
2018-02-25 17:42:56 +03:00
|
|
|
:modes (carp-mode))
|
|
|
|
|
|
|
|
(eval-after-load 'flycheck
|
|
|
|
'(add-to-list 'flycheck-checkers 'carp-checker))
|
|
|
|
|
|
|
|
;; (flycheck-parse-error-with-patterns
|
|
|
|
;; " At line 11, column 3 in 'foo.carp'"
|
|
|
|
;; (flycheck-checker-get 'carp-checker 'error-patterns)
|
|
|
|
;; 'carp-checker)
|
|
|
|
|
|
|
|
(provide 'carp-flycheck)
|