     |> get_dir_paths
     |> add_config_dirs
   end
+
+  defp ensure_values_present({:ok, config}) do
+    config = %__MODULE__{
+      check_for_updates: config.check_for_updates,
+      requires: config.requires || [],
+      plugins: config.plugins || [],
+      files: %{
+        included: merge_files_default(@default_files_included, config.files.included),
+        excluded: merge_files_default(@default_files_excluded, config.files.excluded)
+      },
+      checks: config.checks,
+      parse_timeout: merge_parse_timeout(@default_parse_timeout, config.parse_timeout),
+      strict: merge_boolean(@default_strict, config.strict),
+      color: merge_boolean(@default_color, config.color)
+    }
+
+    {:ok, config}
+  end
+
+  defp ensure_values_present(error), do: error
 
   defp get_dir_paths(dirs), do: do_get_dir_paths(dirs, [])
 

    files = %{
      included:
        files[:included]
        |> Enum.map(&add_directory_to_file(&1, dir))
        |> Enum.uniq(),
      excluded:
        files[:excluded]
        |> Enum.map(&add_directory_to_file(&1, dir))
        |> Enum.uniq()
    }

  defp merge_boolean(_base, false), do: false
  defp merge_boolean(base, _), do: base

  defp merge_files_default(_base, [_head | _tail] = non_empty_list), do: non_empty_list
  defp merge_files_default(base, _), do: base

  defp merge_parse_timeout(_base, timeout) when is_integer(timeout), do: timeout
  defp merge_parse_timeout(base, _), do: base

