Skip to content

Instantly share code, notes, and snippets.

@BernardNotarianni
Created September 21, 2015 19:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BernardNotarianni/e1ada4c25df91460d19f to your computer and use it in GitHub Desktop.
Save BernardNotarianni/e1ada4c25df91460d19f to your computer and use it in GitHub Desktop.
flycheck erlang otp
;; customize flycheck for otp standard directory structure
(require 'flycheck)
(flycheck-define-checker erlang-otp
"An Erlang syntax checker using the Erlang interpreter."
:command ("erlc" "-o" temporary-directory "-Wall"
"-I" "../include" "-I" "../../include"
"-I" "../../../include" source)
:error-patterns
((warning line-start (file-name) ":" line ": Warning:" (message) line-end)
(error line-start (file-name) ":" line ": " (message) line-end)))
(add-hook 'erlang-mode-hook
(lambda ()
(flycheck-select-checker 'erlang-otp)
(flycheck-mode)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment