Skip to content

Commit

Permalink
add erlang's -pa option for recognize ebin directory while checking s…
Browse files Browse the repository at this point in the history
…yntax.
  • Loading branch information
Minsu Choi committed Apr 20, 2012
1 parent 7b5f387 commit ca6cdb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Support/lib/validate_on_save/validators/erlang.rb
Expand Up @@ -4,9 +4,11 @@ def self.erlang
erlc_bin = ENV['TM_ERLC'] ||= "erlc"
tmp = VOS.opt("VOS_ERL_OUTPUT_TO_TMP")
output = (tmp) ? "-o /tmp" : ""
option = "-pa #{ENV['TM_PROJECT_DIRECTORY']}/ebin"
option += " -pa #{ENV['TM_PROJECT_DIRECTORY']}/apps/*/ebin"
VOS.output({
:info => "",
:result => `"#{erlc_bin}" #{output} "#{ENV['TM_FILEPATH']}"`,
:result => `"#{erlc_bin}" #{output} #{option} "#{ENV['TM_FILEPATH']}"`,
:match_ok => /^$/i,
:match_line => /.*?#{Regexp.escape(ENV['TM_FILENAME'])}\:(\d+)\:.*/i,
:lang => "Erlang"
Expand Down

0 comments on commit ca6cdb9

Please sign in to comment.