Gate Diff Only Test Coverage On Changed Lines Before Merging With Diff Cover
Compare coverage reports against a git diff so an agent can flag newly changed lines that still lack tests before merge.
Prerequisites
Git, supported XML or LCov coverage report, Python 3, pip
Installation
Use the upstream install or setup path that matches your environment:
- pip install diff-cover
- git clone https://github.com/Bachmann1234/diff-cover.git
- make a pull request from your fork.
- pip install poetry
Requirements and caveats from upstream:
- Currently, diff-cover requires that:
- coverage.py__ (Python)
- poetry manages a python virtual environment and organizes dependencies. It also
Basic usage or getting-started notes:
To install the latest release:
.. code:: bash
Extracted from upstream docs: https://raw.githubusercontent.com/Bachmann1234/diff_cover/HEAD/README.rst