Skip to content

Instantly share code, notes, and snippets.

@BernardNotarianni
Created September 21, 2015 19:54
Show Gist options
  • Select an option

  • Save BernardNotarianni/e1ada4c25df91460d19f to your computer and use it in GitHub Desktop.

Select an option

Save BernardNotarianni/e1ada4c25df91460d19f to your computer and use it in GitHub Desktop.

Revisions

  1. BernardNotarianni created this gist Sep 21, 2015.
    15 changes: 15 additions & 0 deletions user.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    ;; 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)))