summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2015-03-25 23:28:36 -0700
committerFred Hebert <mononcqc@ferd.ca>2015-03-25 23:28:36 -0700
commit9311d9087cb604a73d67fd712c7684955ab59bfe (patch)
tree77887e20a52a43b38c36801ef97e4cbf545c2b83
parent646e1075c683d68a2893429ba22317d85ccc747a (diff)
parent447fb1a02e14b315b308f328b421e280c5a9e274 (diff)
Merge pull request #283 from fishcakez/dial_warns
Fix some dialyzer warnings
-rw-r--r--src/rebar_app_info.erl2
-rw-r--r--src/rebar_prv_deps.erl2
-rw-r--r--src/rebar_prv_erlydtl_compiler.erl1
-rw-r--r--src/rebar_prv_escriptize.erl2
-rw-r--r--src/rebar_prv_install_deps.erl4
-rw-r--r--src/rebar_prv_xref.erl2
-rw-r--r--src/rebar_state.erl2
7 files changed, 7 insertions, 8 deletions
diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl
index 94c66db..9659c0b 100644
--- a/src/rebar_app_info.erl
+++ b/src/rebar_app_info.erl
@@ -49,7 +49,7 @@
app_details=[] :: list(),
applications=[] :: list(),
deps=[] :: list(),
- profiles=[default] :: atom(),
+ profiles=[default] :: [atom()],
dep_level=0 :: integer(),
dir :: file:name(),
out_dir :: file:name(),
diff --git a/src/rebar_prv_deps.erl b/src/rebar_prv_deps.erl
index cfa2d3f..f1697b6 100644
--- a/src/rebar_prv_deps.erl
+++ b/src/rebar_prv_deps.erl
@@ -74,7 +74,7 @@ display_dep(_State, {Name, _Vsn, Source}) when is_tuple(Source) ->
display_dep(_State, {Name, _Vsn, Source, _Opts}) when is_tuple(Source) ->
?CONSOLE("~s* (source ~p)", [ec_cnv:to_binary(Name), Source]);
%% Locked
-display_dep(State, {Name, Source={pkg, _, Vsn, _}, Level}) when is_integer(Level) ->
+display_dep(State, {Name, Source={pkg, _, Vsn}, Level}) when is_integer(Level) ->
DepsDir = rebar_dir:deps_dir(State),
AppDir = filename:join([DepsDir, ec_cnv:to_binary(Name)]),
NeedsUpdate = case rebar_fetch:needs_update(AppDir, Source) of
diff --git a/src/rebar_prv_erlydtl_compiler.erl b/src/rebar_prv_erlydtl_compiler.erl
index db4dde2..79244ee 100644
--- a/src/rebar_prv_erlydtl_compiler.erl
+++ b/src/rebar_prv_erlydtl_compiler.erl
@@ -173,7 +173,6 @@ option(Opt, DtlOpts) ->
default(app) -> undefined;
default(doc_root) -> "priv/templates";
-default(out_dir) -> "ebin";
default(source_ext) -> ".dtl";
default(module_ext) -> "_dtl";
default(custom_tags_dir) -> "";
diff --git a/src/rebar_prv_escriptize.erl b/src/rebar_prv_escriptize.erl
index d5708c5..69ac7fe 100644
--- a/src/rebar_prv_escriptize.erl
+++ b/src/rebar_prv_escriptize.erl
@@ -69,7 +69,7 @@ escriptize(State0) ->
[App] ->
App;
Apps ->
- case rebar_state:get(escript_main_app, State0, undefined) of
+ case rebar_state:get(State0, escript_main_app, undefined) of
undefined ->
?PRV_ERROR(no_main_app);
Name ->
diff --git a/src/rebar_prv_install_deps.erl b/src/rebar_prv_install_deps.erl
index 8ac78bf..e92a3f0 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -346,7 +346,7 @@ handle_dep(AppInfo, SrcDeps, PkgDeps, SrcApps, Level, State, Locks) ->
,NewLocks}.
-spec handle_dep(rebar_state:t(), file:filename_all(), rebar_app_info:t(), list(), integer()) ->
- {rebar_app_info:t(), [rebar_app_info:t()], [pkg_dep()]}.
+ {rebar_app_info:t(), [rebar_app_info:t()], [pkg_dep()], [integer()]}.
handle_dep(State, DepsDir, AppInfo, Locks, Level) ->
Profiles = rebar_state:current_profiles(State),
Name = rebar_app_info:name(AppInfo),
@@ -402,7 +402,7 @@ in_default(AppInfo, State) ->
DefaultAppDir = filename:join([rebar_state:get(State, base_dir), "default", "lib", Name]),
rebar_app_discover:find_app(DefaultAppDir, all).
--spec parse_deps(binary(), list(), list(), list(), integer()) -> {[rebar_app_info:t()], [pkg_dep()]}.
+-spec parse_deps(binary(), list(), rebar_state:t(), list(), integer()) -> {[rebar_app_info:t()], [pkg_dep()]}.
parse_deps(DepsDir, Deps, State, Locks, Level) ->
lists:foldl(fun(Dep, Acc) ->
Name = case Dep of
diff --git a/src/rebar_prv_xref.erl b/src/rebar_prv_xref.erl
index cc33f51..aa1075f 100644
--- a/src/rebar_prv_xref.erl
+++ b/src/rebar_prv_xref.erl
@@ -88,7 +88,7 @@ desc() ->
" - (\"mod\":\".*foo\"/\"4\"))",[]}]}
]).
--spec prepare(rebar_state:t()) -> list(atom()).
+-spec prepare(rebar_state:t()) -> {[file:filename()], [atom()]}.
prepare(State) ->
{ok, _} = xref:start(xref),
ok = xref:set_library_path(xref, code_path(State)),
diff --git a/src/rebar_state.erl b/src/rebar_state.erl
index c4cb94d..cd127c0 100644
--- a/src/rebar_state.erl
+++ b/src/rebar_state.erl
@@ -41,7 +41,7 @@
lock = [],
current_profiles = [default] :: [atom()],
- namespace = undefined :: [atom()],
+ namespace = undefined :: atom(),
command_args = [],
command_parsed_args = [],