← 全部工具

lcov-total

热度 65 更新于 开发与构建

Parsing lcov.info and returning total of the summary intended to use inside CI to exit if threshold not reach

npmauto-collected

安装

npm
npm install -g lcov-total

通过 npm 安装。

<h1 align="center"lcov-total</h1

<div align="center"

</div

Table of contents

  • About
  • Installation
  • Usage
  • Contributing
  • License
  • Contact
  • Acknowledgements

About

This module now uses ESM modules from v2.0.0, if you need to use CommonJS refer to v1.x.x

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 globally

npm install -g lcov-total

Or use NPX

npx lcov-total