diff options
author | James Fish <james@fishcakez.com> | 2015-08-09 23:49:54 +0100 |
---|---|---|
committer | James Fish <james@fishcakez.com> | 2015-08-09 23:49:54 +0100 |
commit | fc6cc368c3e41b989c8cc9d079774d7ff80a51f6 (patch) | |
tree | 6ba8cf9b2b91dfb107d53dffd3b6944b4d2ffdba | |
parent | ecf6ad552444fa4e786bcd3959079033aff2ab7b (diff) |
Fix some unknown functions/types dialyzer warnings
-rw-r--r-- | rebar.config | 3 | ||||
-rw-r--r-- | src/rebar.app.src | 5 | ||||
-rw-r--r-- | src/rebar_app_utils.erl | 3 | ||||
-rw-r--r-- | src/rebar_erlc_compiler.erl | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/rebar.config b/rebar.config index 87a842e..2ce40e2 100644 --- a/rebar.config +++ b/rebar.config @@ -20,7 +20,8 @@ no_debug_info, warnings_as_errors]}. -{dialyzer_plt_apps, [common_test, dialyzer, eunit, snmp]}. +%% Use OTP 18+ when dialyzing rebar3 +{dialyzer, [{warnings, [unknown]}]}. %% Profiles {profiles, [{test, [ diff --git a/src/rebar.app.src b/src/rebar.app.src index 9d0e027..0a2e6cf 100644 --- a/src/rebar.app.src +++ b/src/rebar.app.src @@ -15,6 +15,11 @@ tools, eunit, common_test, + dialyzer, + public_key, + edoc, + snmp, + getopt, erlware_commons, providers, bbmustache, diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index 92c3ff8..e9745c3 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -94,7 +94,8 @@ format_error(Error) -> %% Internal functions %% =================================================================== --spec has_all_beams(file:filename_all(), list()) -> true | providers:error(). +-spec has_all_beams(file:filename_all(), [module()]) -> + true | ?PRV_ERROR({missing_module, module()}). has_all_beams(EbinDir, [Module | ModuleList]) -> BeamFile = filename:join([EbinDir, ec_cnv:to_list(Module) ++ ".beam"]), diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index 87cf352..624fe0b 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -382,7 +382,7 @@ expand_file_names(Files, Dirs) -> end, Files). --spec internal_erl_compile(rebar_config:config(), file:filename(), file:filename(), +-spec internal_erl_compile(rebar_state:t(), file:filename(), file:filename(), file:filename(), list()) -> ok | {ok, any()} | {error, any(), any()}. internal_erl_compile(Config, Dir, Module, OutDir, ErlOpts) -> Target = target_base(OutDir, Module) ++ ".beam", |