lcov-average
About The Project
This simple package aim to parse lcov.info
files and provide the total coverage Number
without fancy formatting or anything else, either in stdout or programmatically.
Here's why:
- You need to assest coverage in your CI and fail below certain threshold
- you don't want to do unredable
awk
chains - every other options outputs fancy colored output which is tediuous to parse and error prone
Installation
You can install locally
npm install lcov-total
You can install glocally
npm install -g lcov-total
Or use NPX
npx lcov-total
Usage
You can use lcov-total
from command line providing lcov.info
file location eg:
npx lcov-total lcov.info
Or programmatically
const lcovTotal = require("lcov-total");
lcovTotal("/path/to/lcov.info");
Contributing
Project is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.
This projects uses commitizen so be sure to use standard commit format or PR won't be accepted
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'feat(scope): some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Simone Corsi - @im_simonecorsi
Acknowledgements