relcov

A simple CLI tool for transforming absolute lcov source file paths to paths relative to the source root.

  • relcov

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
relcov
1.0.66 years ago6 years agoMinified + gzip package size for relcov in KB

Readme

relcov
!Build Status12 !Test Coverage34 !Code Climate56 !Issue Count76 !Dependencies Status89 !DevDependencies Status1314

A simple CLI tool for transforming absolute lcov source file paths to relative paths. This is useful when using cloud CI tools such as Travis CI and quality reporting tools such as Code Climate. istanbul will generate lcov files with absolute paths (as will most coverage tools), however the aforementioned cloud tools require lcov files with relative source file paths.

Installation

This module is best used in an npm script...
npm install relcov --save-dev

...but if you must you can install it globally.
npm install relcov -g

Changelog

v1.0.2 (2016-09-28) - Initial release.

Usage

The classic usage example would be to fix an lcov when pushing it to code climate (preferably in an npm script) like so:
relcov < ./coverage/lcov.info | codeclimate-test-reporter

It will read the the lcov file from stdin and push the (relative) lcov file to stdout. It will make the paths relative to the current working directory.

Issues

relcov is a very simple tool covering my specific use case. If you find it useful and require other features don't hesitate to log an issue

LICENSE

MIT