google / vim-coverage

Apache License 2.0
101 stars 22 forks source link

Support rendering coverage results generated from older versions of a file #34

Open dbarnett opened 6 years ago

dbarnett commented 6 years ago

For some projects and coverage tools, coverage is expensive to evaluate and it's useful to be able to show coverage data from an older snapshot.

There's some complexity to getting this kind of snapshotted coverage functionality to work well since line numbers won't match up if there have been significant modifications to the file since, and there may need to be a way to show a diff of the modifications.

dbarnett commented 6 years ago

The :CoverageShowDiff command was created to help with this scenario to show modifications that were made to the file vs. the version that existed at the time coverage was evaluated, but it has some quirks and relies on an undocumented hack of passing a diff_path field in the results dict to make it work.

blueyed commented 6 years ago

https://github.com/aconrad/pycobertura might be useful in this regard.