Browse Source

Merge pull request #1765 from ferd/clear-all-dialyzer-errors

Clear all dialyzer errors
pull/1769/head
Fred Hebert 7 years ago
committed by GitHub
parent
commit
7eca59670f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions
  1. +1
    -0
      src/rebar.app.src
  2. +1
    -1
      src/rebar_string.erl
  3. +11
    -1
      test/rebar_dir_SUITE.erl

+ 1
- 0
src/rebar.app.src View File

@ -8,6 +8,7 @@
{registered, []},
{applications, [kernel,
stdlib,
hipe,
sasl,
compiler,
crypto,

+ 1
- 1
src/rebar_string.erl View File

@ -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]).

+ 11
- 1
test/rebar_dir_SUITE.erl View File

@ -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]).
@ -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].
@ -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"]}]},

Loading…
Cancel
Save