Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add code paths for parse transforms, optimise rebar.config check

  • Loading branch information...
commit 8d4488642ac23020d9c6e96bc06086cd2a3e079c 1 parent 23b691a
@RJ authored
Showing with 7 additions and 5 deletions.
  1. +7 −5 compiler/erlang_check_file.erl
View
12 compiler/erlang_check_file.erl
@@ -2,16 +2,18 @@
-export([main/1]).
main([File_Name]) ->
+ %% If we use parse transforms (lager, etc):
+ code:add_paths(["ebin"] ++ filelib:wildcard("deps/*/ebin")),
Default = [ warn_obsolete_guard,
warn_unused_import,
warn_shadow_vars, warn_export_vars,
strong_validation, report],
- case filelib:is_file("rebar.config") of
- true ->
- {ok, Terms} = file:consult("rebar.config"),
+ %% Take our options from rebar.config:
+ case file:consult("rebar.config") of
+ {ok, Terms} ->
Opts = proplists:get_value(erl_opts, Terms, []),
compile:file(File_Name, Default ++ Opts);
- false ->
- compile:file(File_Name, Default)
+ _ ->
+ compile:file(File_Name, Default ++ [{i, "../include"}])
end.
Please sign in to comment.
Something went wrong with that request. Please try again.