浏览代码

fix dialyzer warnings

pull/787/head
Tristan Sloughter 9 年前
父节点
当前提交
14ab5f562e
共有 7 个文件被更改,包括 11 次插入13 次删除
  1. +1
    -1
      src/rebar_app_utils.erl
  2. +3
    -3
      src/rebar_erlc_compiler.erl
  3. +1
    -1
      src/rebar_plugins.erl
  4. +1
    -1
      src/rebar_prv_clean.erl
  5. +1
    -1
      src/rebar_prv_dialyzer.erl
  6. +1
    -1
      src/rebar_prv_install_deps.erl
  7. +3
    -5
      src/rebar_prv_path.erl

+ 1
- 1
src/rebar_app_utils.erl 查看文件

@ -90,7 +90,7 @@ validate_application_info(AppInfo, AppDetail) ->
end
end.
-spec parse_deps(binary(), list(), rebar_state:t(), list(), integer()) -> {[rebar_app_info:t()], [tuple()]}.
-spec parse_deps(binary(), list(), rebar_state:t(), list(), integer()) -> [rebar_app_info:t()].
parse_deps(DepsDir, Deps, State, Locks, Level) ->
parse_deps(root, DepsDir, Deps, State, Locks, Level).

+ 3
- 3
src/rebar_erlc_compiler.erl 查看文件

@ -28,7 +28,7 @@
-export([compile/1,
compile/3,
clean/2]).
clean/1]).
-include("rebar.hrl").
-include_lib("stdlib/include/erl_compile.hrl").
@ -104,8 +104,8 @@ compile(Opts, Dir, OutDir) ->
fun compile_mib/3),
doterl_compile(Opts, Dir, OutDir).
-spec clean(rebar_dict(), file:filename()) -> 'ok'.
clean(_Opts, AppDir) ->
-spec clean(file:filename()) -> 'ok'.
clean(AppDir) ->
MibFiles = rebar_utils:find_files(filename:join(AppDir, "mibs"), ?RE_PREFIX".*\\.mib\$"),
MIBs = [filename:rootname(filename:basename(MIB)) || MIB <- MibFiles],
rebar_file_utils:delete_each(

+ 1
- 1
src/rebar_plugins.erl 查看文件

@ -26,7 +26,7 @@ project_apps_install(State) ->
lists:foldl(fun(AppInfo, StateAcc2) ->
C = rebar_config:consult(rebar_app_info:dir(AppInfo)),
AppInfo0 = rebar_app_info:update_opts(AppInfo, rebar_app_info:opts(AppInfo), C),
Plugins2 = rebar_state:get(AppInfo0, {plugins, Profile}, []),
Plugins2 = rebar_app_info:get(AppInfo0, {plugins, Profile}, []),
handle_plugins(Profile, Plugins2, StateAcc2)
end, StateAcc1, ProjectApps)
end, State, Profiles).

+ 1
- 1
src/rebar_prv_clean.erl 查看文件

@ -66,7 +66,7 @@ clean_apps(State, Providers, Apps) ->
?INFO("Cleaning out ~s...", [rebar_app_info:name(AppInfo)]),
AppDir = rebar_app_info:dir(AppInfo),
AppInfo1 = rebar_hooks:run_all_hooks(AppDir, pre, ?PROVIDER, Providers, AppInfo, State),
rebar_erlc_compiler:clean(State, rebar_app_info:out_dir(AppInfo1)),
rebar_erlc_compiler:clean(rebar_app_info:out_dir(AppInfo1)),
rebar_hooks:run_all_hooks(AppDir, post, ?PROVIDER, Providers, AppInfo1, State)
end || AppInfo <- Apps].

+ 1
- 1
src/rebar_prv_dialyzer.erl 查看文件

@ -313,7 +313,7 @@ get_base_plt(State) ->
Name = plt_name(Prefix),
case get_config(State, base_plt_location, global) of
global ->
GlobalCacheDir = rebar_dir:global_cache_dir(State),
GlobalCacheDir = rebar_dir:global_cache_dir(rebar_state:opts(State)),
filename:join(GlobalCacheDir, Name);
Dir ->
filename:join(Dir, Name)

+ 1
- 1
src/rebar_prv_install_deps.erl 查看文件

@ -249,7 +249,7 @@ update_unseen_dep(AppInfo, Profile, Level, Deps, Apps, State, Upgrade, Seen, Loc
AppInfo3 = rebar_app_info:dep_level(AppInfo2, Level),
{NewDeps ++ Deps, [AppInfo3 | Apps], State2, NewSeen}.
-spec handle_dep(rebar_state:t(), atom(), file:filename_all(), rebar_app_info:t(), list(), integer()) -> {rebar_app_info:t(), [rebar_app_info:t()], [pkg_dep()], [integer()], rebar_state:t()}.
-spec handle_dep(rebar_state:t(), atom(), file:filename_all(), rebar_app_info:t(), list(), integer()) -> {rebar_app_info:t(), [rebar_app_info:t()], rebar_state:t()}.
handle_dep(State, Profile, DepsDir, AppInfo, Locks, Level) ->
Profiles = rebar_state:current_profiles(State),
Name = rebar_app_info:name(AppInfo),

+ 3
- 5
src/rebar_prv_path.erl 查看文件

@ -40,10 +40,8 @@ do(State) ->
Paths = lists:filter(fun({app, _}) -> false; ({separator, _}) -> false; (_) -> true end, RawOpts),
%% if no paths requested in opts print the base_dir instead
P = case Paths of [] -> [{ebin, true}]; _ -> Paths end,
case paths(P, Apps, State, []) of
ok -> {ok, State};
{error, Error} -> {error, Error}
end.
paths(P, Apps, State, []),
{ok, State}.
-spec format_error(any()) -> iolist().
format_error(Reason) ->
@ -124,4 +122,4 @@ help(lib) -> "Return the `lib' path of the current profile.";
help(priv) -> "Return the `priv' path of the current profile's applications.";
help(separator) -> "In case of multiple return paths, the separator character to use to join them.";
help(src) -> "Return the `src' path of the current profile's applications.";
help(rel) -> "Return the `rel' path of the current profile.".
help(rel) -> "Return the `rel' path of the current profile.".

正在加载...
取消
保存