From 0fa2b501f05e700a35c272f98f1ab976a5bd6170 Mon Sep 17 00:00:00 2001 From: James Fish Date: Mon, 11 Jul 2016 14:41:19 +0100 Subject: Don't error when analyzing empty app --- src/rebar_prv_dialyzer.erl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/rebar_prv_dialyzer.erl') diff --git a/src/rebar_prv_dialyzer.erl b/src/rebar_prv_dialyzer.erl index f7e3f21..ec9e81a 100644 --- a/src/rebar_prv_dialyzer.erl +++ b/src/rebar_prv_dialyzer.erl @@ -380,12 +380,15 @@ succ_typings(State, Plt, Output) -> {0, State}; _ -> Apps = rebar_state:project_apps(State), - succ_typings(State, Plt, Output, Apps) + ?INFO("Doing success typing analysis...", []), + Files = apps_to_files(Apps), + succ_typings(State, Plt, Output, Files) end. -succ_typings(State, Plt, Output, Apps) -> - ?INFO("Doing success typing analysis...", []), - Files = apps_to_files(Apps), +succ_typings(State, Plt, _, []) -> + ?INFO("Analyzing no files with ~p...", [Plt]), + {0, State}; +succ_typings(State, Plt, Output, Files) -> ?INFO("Analyzing ~b files with ~p...", [length(Files), Plt]), Opts = [{analysis_type, succ_typings}, {get_warnings, true}, -- cgit v1.1