 defmodule Mix.Tasks.Test do
   defmodule Cover do
+    @default_threshold 90
+
     @moduledoc false
 
     def start(compile_path, opts) do

          Mix.raise("Failed to cover compile directory: " <> compile_path)
      end

      output = opts[:output]

      fn ->
        Mix.shell().info("\nGenerating cover results ...")
        File.mkdir_p!(output)

        Enum.each(:cover.modules(), fn mod ->
          {:ok, _} = :cover.analyse_to_file(mod, '#{output}/#{mod}.html', [:html])
        end)
      end
    end
  end

  use Mix.Task


    * `:output` - the output for cover results, defaults to `"cover"`
    * `:tool`   - the coverage tool
    * `:summary` - summary output configuration, can be either boolean
      or keyword list, when keyword list is passed it can specify `:threshold`
      which can be boolean or numeric value which would enable colouring
      of percentages red/green depending either below/over threshold
      respectively, defaults to `[threshold: 90]`


  By default, a very simple wrapper around OTP's `cover` is used as a tool,
  but it can be overridden as follows:
