Skip to content

Commit

Permalink
htoad_transform should not hijack compilation errors and return forms…
Browse files Browse the repository at this point in the history
… as is

so that the compiler could catch them
  • Loading branch information
Yurii Rashkovskii committed Mar 1, 2012
1 parent bab5601 commit 4549bad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/htoad/src/htoad_transform.erl
Expand Up @@ -21,10 +21,8 @@
parse_transform(Forms, Options) ->
#context{ file = File } = parse_trans:initial_context(Forms, Options),
case erl_lint:module(Forms, File, [nowarn_unused_function,nowarn_unused_vars,nowarn_unused_record]) of
{error, Errors, Warnings} ->
(length(Warnings) > 0 andalso
lager:debug("erl_lint warnings in ~s: ~p", [File, Warnings])),
throw({erl_lint, Errors});
{error, _Errors, _Warnings} ->
Forms;
{ok, Warnings} when is_list(Warnings), length(Warnings) > 0 ->
lager:debug("erl_lint warnings in ~s: ~p", [File, Warnings]);
_ ->
Expand Down

0 comments on commit 4549bad

Please sign in to comment.