summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Fish <james@fishcakez.com>2015-03-18 00:52:29 +0000
committerJames Fish <james@fishcakez.com>2015-03-18 02:46:22 +0000
commit447fb1a02e14b315b308f328b421e280c5a9e274 (patch)
treee7aa0b50d0f1026f0604335c7478d02794498d3c /src
parenta7d70074ffdbe802655d0cf471ae05b4a3d4f55f (diff)
Fix dialyzer warnings
Diffstat (limited to 'src')
-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 172170d..99bc25b 100644
--- a/src/rebar_app_info.erl
+++ b/src/rebar_app_info.erl
@@ -47,7 +47,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 15fdd0a..e4a87ee 100644
--- a/src/rebar_prv_install_deps.erl
+++ b/src/rebar_prv_install_deps.erl
@@ -341,7 +341,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),
@@ -404,7 +404,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 008f202..fa0a963 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 = [],