Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't ignore ignore (pun) after #6 #40

Merged
merged 1 commit into from
Mar 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/elvis_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,10 @@ resolve_files(Config) when is_list(Config) ->
lists:map(fun resolve_files/1, Config);
resolve_files(RuleGroup = #{files := _Files}) ->
RuleGroup;
resolve_files(RuleGroup = #{dirs := Dirs, filter := Filter}) ->
Files = elvis_file:find_files(Dirs, Filter, local),
RuleGroup#{files => Files};
resolve_files(RuleGroup = #{dirs := Dirs}) ->
Files = elvis_file:find_files(Dirs, ?DEFAULT_FILTER),
RuleGroup#{files => Files}.
Filter = filter(RuleGroup),
Files = elvis_file:find_files(Dirs, Filter),
resolve_files(RuleGroup, Files).

%% @doc Takes a function and configuration and applies the function to all
%% file in the configuration.
Expand Down Expand Up @@ -234,4 +232,4 @@ is_rule_override(FileName, RuleName, UserRules) ->
end
end,
UserRules
).
).