Skip to content

Commit ea04772

Browse files
author
Francois Brodeur
authored
Expand dirs in rebar so exclusion works (#296)
1 parent 6e75cc3 commit ea04772

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/rebar_prv_gradualizer.erl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,21 @@ files_to_check(App) ->
5454
Files = lists:flatmap(fun (Pattern) ->
5555
filelib:wildcard(filename:absname(Pattern, Cwd))
5656
end, Patterns),
57+
ExpandedFiles = lists:flatmap(fun (Dir) ->
58+
case filelib:is_dir(Dir) of
59+
true ->
60+
filelib:wildcard(filename:join(Dir, "*.{erl,beam}"));
61+
false ->
62+
[Dir]
63+
end
64+
end, Files),
5765
ExpandedExclude = lists:flatmap(fun (Pattern) ->
5866
filelib:wildcard(filename:absname(Pattern, Cwd))
5967
end, Exclude),
6068
lists:filter(
6169
fun (File) ->
6270
not lists:member(File, ExpandedExclude)
63-
end, Files).
71+
end, ExpandedFiles).
6472

6573
-spec format_error(any()) -> string().
6674
format_error(_) ->

0 commit comments

Comments
 (0)