Browse Source

Fix some unknown functions/types dialyzer warnings

pull/708/head^2
James Fish 9 years ago
parent
commit
fc6cc368c3
4 changed files with 10 additions and 3 deletions
  1. +2
    -1
      rebar.config
  2. +5
    -0
      src/rebar.app.src
  3. +2
    -1
      src/rebar_app_utils.erl
  4. +1
    -1
      src/rebar_erlc_compiler.erl

+ 2
- 1
rebar.config View File

@ -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, [

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

@ -15,6 +15,11 @@
tools,
eunit,
common_test,
dialyzer,
public_key,
edoc,
snmp,
getopt,
erlware_commons,
providers,
bbmustache,

+ 2
- 1
src/rebar_app_utils.erl View File

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

+ 1
- 1
src/rebar_erlc_compiler.erl View File

@ -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",

Loading…
Cancel
Save