   @doc """
   Checks if a dependency has diverged.
   """
-  def diverged?(%Mix.Dep{status: {:overridden, _}}),   do: true
-  def diverged?(%Mix.Dep{status: {:diverged, _}}),     do: true
-  def diverged?(%Mix.Dep{status: {:divergedreq, _}}),  do: true
+  def diverged?(%Mix.Dep{status: {:overridden, _}}), do: true
+  def diverged?(%Mix.Dep{status: {:diverged, _}}), do: true
+  def diverged?(%Mix.Dep{status: {:divergedreq, _}}), do: true
   def diverged?(%Mix.Dep{status: {:divergedonly, _}}), do: true
   def diverged?(%Mix.Dep{}), do: false
 

  @doc """
  Formats the status of a dependency.
  """
  def format_status(%Mix.Dep{status: {:ok, _vsn}}),
    do: "ok"

  def format_status(%Mix.Dep{status: {:noappfile, path}}),
    do: "could not find an app file at #{inspect(Path.relative_to_cwd(path))}. " <>
        "This may happen if the dependency was not yet compiled, " <>
        "or you specified the wrong application name in your deps, " <>
        "or the dependency indeed has no app file (then you can pass app: false as option)"

  def format_status(%Mix.Dep{status: {:invalidapp, path}}),
    do: "the app file at #{inspect(Path.relative_to_cwd(path))} is invalid"

  def format_status(%Mix.Dep{status: {:invalidvsn, vsn}}),
    do: "the app file contains an invalid version: #{inspect vsn}"

  def format_status(%Mix.Dep{status: {:nosemver, vsn}, requirement: req}),
    do: "the app file specified a non-Semantic Versioning format: #{inspect vsn}. Mix can only match the " <>
        "requirement #{inspect req} against semantic versions. Please fix the application version " <>
        "or use a regex as a requirement to match against any version"

  def format_status(%Mix.Dep{status: {:nomatchvsn, vsn}, requirement: req}),
    do: "the dependency does not match the requirement #{inspect req}, got #{inspect vsn}"

  def format_status(%Mix.Dep{status: {:lockmismatch, _}}),
    do: "lock mismatch: the dependency is out of date. To fetch locked version run \"mix deps.get\""

  def format_status(%Mix.Dep{status: :lockoutdated}),
    do: "lock outdated: the lock is outdated compared to the options in your mix.exs. To fetch locked version run \"mix deps.get\""

  def format_status(%Mix.Dep{status: :nolock}),
    do: "the dependency is not locked. To generate the \"mix.lock\" file run \"mix deps.get\""

  def format_status(%Mix.Dep{status: :compile}),
    do: "the dependency build is outdated, please run \"#{mix_env_var()}mix deps.compile\""

  def format_status(%Mix.Dep{app: app, status: {:divergedreq, vsn, other}} = dep) do
    "the dependency #{app} #{vsn}\n" <>
    "#{dep_status(dep)}" <>
    "\n  does not match the requirement specified\n" <>
    "#{dep_status(other)}" <>
    "\n  Ensure they match or specify one of the above in your deps and set \"override: true\""
  end

  def format_status(%Mix.Dep{app: app, status: {:divergedonly, other}} = dep) do

  end

  defp check_manifest(%{scm: scm} = dep, build_path) do
    vsn = {System.version(), :erlang.system_info(:otp_release)}

    case Mix.Dep.ElixirSCM.read(build_path) do
      {:ok, old_vsn, _} when old_vsn != vsn ->
        %{dep | status: {:elixirlock, old_vsn}}

      {:ok, _, old_scm} when old_scm != scm ->
        %{dep | status: {:scmlock, old_scm}}

      _ ->
        dep
    end
