Skip to content

Commit

Permalink
Merge pull request #1765 from ferd/clear-all-dialyzer-errors
Browse files Browse the repository at this point in the history
Clear all dialyzer errors
  • Loading branch information
ferd authored Apr 25, 2018
2 parents 35fb675 + 288d0c7 commit 7eca596
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/rebar.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{registered, []},
{applications, [kernel,
stdlib,
hipe,
sasl,
compiler,
crypto,
Expand Down
2 changes: 1 addition & 1 deletion src/rebar_string.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
%% used. Instead we just adopt join/2 locally and hope it works
%% for most unicode use cases anyway.
join([], Sep) when is_list(Sep) ->
[];
[];
join([H|T], Sep) ->
H ++ lists:append([Sep ++ X || X <- T]).

Expand Down
12 changes: 11 additions & 1 deletion test/rebar_dir_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
-export([default_src_dirs/1, default_extra_src_dirs/1, default_all_src_dirs/1]).
-export([src_dirs/1, src_dirs_with_opts/1, extra_src_dirs/1, all_src_dirs/1]).
-export([src_dir_opts/1, recursive/1]).
-export([top_src_dirs/1]).
-export([profile_src_dirs/1, profile_extra_src_dirs/1, profile_all_src_dirs/1]).
-export([profile_src_dir_opts/1]).
-export([retarget_path/1, alt_base_dir_abs/1, alt_base_dir_rel/1]).
Expand All @@ -18,7 +19,7 @@
all() -> [default_src_dirs, default_extra_src_dirs, default_all_src_dirs,
src_dirs, extra_src_dirs, all_src_dirs, src_dir_opts, recursive,
profile_src_dirs, profile_extra_src_dirs, profile_all_src_dirs,
profile_src_dir_opts,
profile_src_dir_opts, top_src_dirs,
retarget_path, alt_base_dir_abs, alt_base_dir_rel, global_cache_dir,
default_global_cache_dir, overwrite_default_global_cache_dir].

Expand Down Expand Up @@ -123,6 +124,15 @@ recursive(Config) ->

ok.

top_src_dirs(Config) ->
%% We can get the same result out of specifying src_dirs from the config root,
%% not just the erl_opts
RebarConfig = [{src_dirs, ["foo", "./bar", "bar", "bar/", "./bar/", "baz",
"./", ".", "../", "..", "./../", "../.", ".././../"]}],
{ok, State} = rebar_test_utils:run_and_check(Config, RebarConfig, ["compile"], return),

[".", "..", "../..", "bar", "baz", "foo"] = rebar_dir:src_dirs(rebar_state:opts(State)).

profile_src_dirs(Config) ->
RebarConfig = [
{erl_opts, [{src_dirs, ["foo", "bar"]}]},
Expand Down

0 comments on commit 7eca596

Please sign in to comment.