anchor.diff:                       {check_plt, false} |
                        Opts],
               ?DEBUG("Running dialyzer with options: ~p~n", [Opts2]),
  -            Warnings = format_warnings(dialyzer:run(Opts2)),
  +            Warnings = format_warnings(Output, dialyzer:run(Opts2)),
               {Warnings, State};
           false ->
               Opts2 = [{warnings, no_warnings()},
  
positive.code:     {_, Files, Warnings} = app_name_to_info(AppName),
      {Files, Warnings}.
  
  run_dialyzer(State, Opts) ->
      %% dialyzer may return callgraph warnings when get_warnings is false
      case proplists:get_bool(get_warnings, Opts) of
          true ->
  
negative.code:             throw({dialyzer_error, Error})
      end.
  
  check_plt(State, Plt, Output, OldList, FilesList) ->
      Old = sets:from_list(OldList),
      Files = sets:from_list(FilesList),
      Remove = sets:to_list(sets:subtract(Old, Files)),
      {RemWarnings, State1} = remove_plt(State, Plt, Output, Remove),
      Check = sets:to_list(sets:intersection(Files, Old)),
      {CheckWarnings, State2} = check_plt(State1, Plt, Output, Check),
      Add = sets:to_list(sets:subtract(Files, Old)),
      {AddWarnings, State3} = add_plt(State2, Plt, Output, Add),
      {RemWarnings + CheckWarnings + AddWarnings, State3}.
  
  remove_plt(State, _Plt, _Output, []) ->
      {0, State};
  remove_plt(State, Plt, Output, Files) ->
      ?INFO("Removing ~b files from ~p...", [length(Files), Plt]),
      run_plt(State, Plt, Output, plt_remove, Files).
  
  check_plt(State, _Plt, _Output, []) ->
      {0, State};
  check_plt(State, Plt, Output, Files) ->
      ?INFO("Checking ~b files in ~p...", [length(Files), Plt]),
      run_plt(State, Plt, Output, plt_check, Files).
  
  add_plt(State, _Plt, _Output, []) ->
      {0, State};
  add_plt(State, Plt, Output, Files) ->
      ?INFO("Adding ~b files to ~p...", [length(Files), Plt]),
      run_plt(State, Plt, Output, plt_add, Files).
  
  run_plt(State, Plt, Output, Analysis, Files) ->
      GetWarnings = rebar_state:get(State, dialyzer_plt_warnings, false),
      Opts = [{analysis_type, Analysis},
              {get_warnings, GetWarnings},
              {init_plt, Plt},
              {from, byte_code},
              {files, Files}],
      run_dialyzer(State, Opts, Output).
  
  build_proj_plt(State, Plt, Output, Files) ->
      BasePlt = get_base_plt_location(State),
      ?INFO("Updating base plt...", []),
      {BaseFiles, BaseWarnings} = base_plt_files(State),
      BaseWarnings2 = format_warnings(Output, BaseWarnings),
      {BaseWarnings3, State1} = update_base_plt(State, BasePlt, Output,
                                                BaseFiles),
      ?INFO("Copying ~p to ~p...", [BasePlt, Plt]),
      _ = filelib:ensure_dir(Plt),
      case file:copy(BasePlt, Plt) of
          {ok, _} ->
              {CheckWarnings, State2} = check_plt(State1, Plt, Output, BaseFiles,
                                                  Files),
              {BaseWarnings2 + BaseWarnings3 + CheckWarnings, State2};
          {error, Reason} ->
              Error = io_lib:format("Could not copy PLT from ~p to ~p: ~p",
  