This library abstracts a general representation of code, which braces line coverage, block annotation and diff info.
Then, built on top of this representation, coverage info from different commits are able be merged together, which facilitates coverage inheritance.
The following packages define different operations on the annotation structure defined in package model:
- load: load primitive annotations like diff changes
- filter: filter based on criteria
- map: map from one form to another, for example, prepend path to files
- compute: compute derived annotations from primitvie annotations and other derived annotations
Generalize annotation data structure.
This helps store and analyse annotation data unified.
In reality, it reduces table redundancy.
I find there are dozens of representations of code coverage, e.g. xml in java, plain text in golang. They correspond to different language-specific structures, which makes it quite difficult to develop a general coverage review UI.
To address this issue, I've created this library, firstly used in golang, then expanded to js. It has been proven universal for common usage.
This project is used by xgo as core library to provide coverage report.