aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_worker.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dialyzer/src/dialyzer_worker.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_worker.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/dialyzer/src/dialyzer_worker.erl b/lib/dialyzer/src/dialyzer_worker.erl
index 48dae7cb56..6608b78f0a 100644
--- a/lib/dialyzer/src/dialyzer_worker.erl
+++ b/lib/dialyzer/src/dialyzer_worker.erl
@@ -64,7 +64,7 @@ launch(Mode, Job, Servers, Coordinator) ->
InitState =
case Mode of
X when X =:= 'typesig'; X =:= 'dataflow' -> initializing;
- 'compile' -> running
+ X when X =:= 'compile'; X =:= 'warnings' -> running
end,
spawn(fun() -> loop(InitState, State) end).
@@ -109,6 +109,10 @@ loop(running, #state{mode = 'compile'} = State) ->
Error
end,
report_to_coordinator(Result, State);
+loop(running, #state{mode = 'warnings'} = State) ->
+ ?debug("Warning: ~s\n",[State#state.job]),
+ Result = collect_warnings(State),
+ report_to_coordinator(Result, State);
loop(running, #state{mode = Mode} = State) when
Mode =:= 'typesig'; Mode =:= 'dataflow' ->
?debug("Run: ~p\n",[State#state.job]),
@@ -184,3 +188,6 @@ ask_coordinator_for_label(EstimatedSize, #state{coordinator = Coordinator}) ->
continue_compilation(Label, Data) ->
dialyzer_analysis_callgraph:continue_compilation(Label, Data).
+
+collect_warnings(#state{job = Job, servers = Servers}) ->
+ dialyzer_succ_typings:collect_warnings(Job, Servers).