Skip to content

Commit

Permalink
Expand dirs in rebar so exclusion works (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Brodeur authored Nov 6, 2020
1 parent 6e75cc3 commit ea04772
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/rebar_prv_gradualizer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,21 @@ files_to_check(App) ->
Files = lists:flatmap(fun (Pattern) ->
filelib:wildcard(filename:absname(Pattern, Cwd))
end, Patterns),
ExpandedFiles = lists:flatmap(fun (Dir) ->
case filelib:is_dir(Dir) of
true ->
filelib:wildcard(filename:join(Dir, "*.{erl,beam}"));
false ->
[Dir]
end
end, Files),
ExpandedExclude = lists:flatmap(fun (Pattern) ->
filelib:wildcard(filename:absname(Pattern, Cwd))
end, Exclude),
lists:filter(
fun (File) ->
not lists:member(File, ExpandedExclude)
end, Files).
end, ExpandedFiles).

-spec format_error(any()) -> string().
format_error(_) ->
Expand Down

0 comments on commit ea04772

Please sign in to comment.