View Source CoverDiff (CoverDiff v0.1.1)

Generates a coverage report for the code in a git diff. To use it as a coverage module:

  def project() do
    [
      ...
      test_coverage: [tool: CoverDiff, base_branch: "my_base_branch"]
      ...
    ]
  end

The diff will span between your current HEAD and the specified branch in your :test_coverage options:

  • :base_branch - branch to diff against, defaults to "master"
  • :context - how many lines to show around uncovered lines in reports, defaults to 2

CoverDiff currently does not work with umbrella applications.

CoverDiff can also be used as a Mix task without polluting your project configuration. This lets you use any cover tool capable of exporting .coverdata files during tests and analyze them afterwards using CoverDiff. Check Mix.Tasks.CoverDiff for details.

Summary

Functions