Skip to content

Commit

Permalink
Merge pull request #1403 from robertoaloi/fix-regexp-for-matching-files
Browse files Browse the repository at this point in the history
Restrict regexp to match on files starting with '._'
  • Loading branch information
ferd authored Dec 6, 2016
2 parents 41d4002 + 74d290b commit 9f7e79d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rebar_base_compiler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ run(Config, FirstFiles, SourceDir, SourceExt, TargetDir, TargetExt,
run(Config, FirstFiles, SourceDir, SourceExt, TargetDir, TargetExt,
Compile3Fn, Opts) ->
%% Convert simple extension to proper regex
SourceExtRe = "^[^._].*\\" ++ SourceExt ++ [$$],
SourceExtRe = "^(?!._).*\\" ++ SourceExt ++ [$$],

Recursive = proplists:get_value(recursive, Opts, true),
%% Find all possible source files
Expand Down
2 changes: 1 addition & 1 deletion src/rebar_erlc_compiler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
-type compile_opt() :: {recursive, boolean()}.

-define(DEFAULT_OUTDIR, "ebin").
-define(RE_PREFIX, "^[^._]").
-define(RE_PREFIX, "^(?!._)").

%% ===================================================================
%% Public API
Expand Down
2 changes: 1 addition & 1 deletion src/rebar_prv_eunit.erl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
%% we need to modify app_info state before compile
-define(DEPS, [lock]).

-define(DEFAULT_TEST_REGEX, "^[^._].*\\.erl\$").
-define(DEFAULT_TEST_REGEX, "^(?!._).*\\.erl\$").

%% ===================================================================
%% Public API
Expand Down
2 changes: 1 addition & 1 deletion src/rebar_templater.erl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

-include("rebar.hrl").

-define(TEMPLATE_RE, "^[^._].*\\.template\$").
-define(TEMPLATE_RE, "^(?!._).*\\.template\$").

%% ===================================================================
%% Public API
Expand Down

0 comments on commit 9f7e79d

Please sign in to comment.