   @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{status: {:ok, _vsn}}) do
+    "ok"
+  end
+
+  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)"
+  end
+
+  def format_status(%Mix.Dep{status: {:invalidapp, path}}) do
+    "the app file at #{inspect(Path.relative_to_cwd(path))} is invalid"
+  end
+
+  def format_status(%Mix.Dep{status: {:invalidvsn, vsn}}) do
+    "the app file contains an invalid version: #{inspect(vsn)}"
+  end
+
+  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"
+  end
+
+  def format_status(%Mix.Dep{status: {:nomatchvsn, vsn}, requirement: req}) do
+    "the dependency does not match the requirement #{inspect(req)}, got #{inspect(vsn)}"
+  end
+
+  def format_status(%Mix.Dep{status: {:lockmismatch, _}}) do
+    "lock mismatch: the dependency is out of date. To fetch locked version run \"mix deps.get\""
+  end
+
+  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\""
+  end
+
+  def format_status(%Mix.Dep{status: :nolock}) do
+    "the dependency is not locked. To generate the \"mix.lock\" file run \"mix deps.get\""
+  end
+
+  def format_status(%Mix.Dep{status: :compile}) do
+    "the dependency build is outdated, please run \"#{mix_env_var()}mix deps.compile\""
+  end
 
   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\""
+      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

    dest = opts[:dest]

    # Add root dir and all sub dirs with ebin/ directory
    [{opts[:dest], Atom.to_string(app)}] ++
      for(sub_dir <- sub_dirs,
          path <- Path.wildcard(Path.join(dest, sub_dir)),
          File.dir?(Path.join(path, "ebin")),
          do: {path, Path.basename(path)})
  end

  def source_paths(%Mix.Dep{app: app, opts: opts}) do

        get_deps(all_deps, apps)
      end

    Enum.each(apps, fn app ->
      unless Enum.any?(all_deps, &(&1.app == app)) do
        Mix.raise("Unknown dependency #{app} for environment #{Mix.env()}")
      end
    end)

    deps
  end
