   def child_spec(module_or_map, overrides)
 
   def child_spec({_, _, _, _, _, _} = tuple, _overrides) do
-    raise ArgumentError, "old tuple-based child specification #{inspect tuple} " <>
-                         "is not supported in Supervisor.child_spec/2"
+    raise ArgumentError,
+          "old tuple-based child specification #{inspect(tuple)} " <>
+            "is not supported in Supervisor.child_spec/2"
   end
 
   def child_spec(module_or_map, overrides) do
-    Enum.reduce overrides, init_child(module_or_map), fn
+    Enum.reduce(overrides, init_child(module_or_map), fn
       {key, value}, acc when key in [:id, :start, :restart, :shutdown, :type, :modules] ->
         Map.put(acc, key, value)
+
       {key, _value}, _acc ->
-        raise ArgumentError, "unknown key #{inspect key} in child specification override"
-    end
+        raise ArgumentError, "unknown key #{inspect(key)} in child specification override"
+    end)
   end
 
   @doc """

  section in the `GenServer` module docs.
  """
  @spec start_link(module, term) :: on_start
  @spec start_link(module, term, GenServer.options) :: on_start
  def start_link(module, arg, options \\ []) when is_list(options) do
    case Keyword.get(options, :name) do
      nil ->
        :supervisor.start_link(module, arg)
      atom when is_atom(atom) ->
        :supervisor.start_link({:local, atom}, module, arg)
      {:global, _term} = tuple ->
        :supervisor.start_link(tuple, module, arg)
      {:via, via_module, _term} = tuple when is_atom(via_module) ->
        :supervisor.start_link(tuple, module, arg)
      other ->
        raise ArgumentError, """
        expected :name option to be one of:

      * a child specification as a map with at least the :id and :start fields
      * or a tuple with 6 elements generated by Supervisor.Spec (deprecated)

    Got: #{inspect(other)}
    """
  end

  defp child_spec_error(module) do
    if Code.ensure_loaded?(module) do
      """
      The module #{inspect(module)} was given as a child to a supervisor
      but it does not implement child_spec/1.

      If you own the given module, please define a child_spec/1 function
