Socket
Socket
Sign inDemoInstall

lcov-result-merger

Package Overview
Dependencies
34
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lcov-result-merger

Merges multiple lcov results into one


Version published
Weekly downloads
72K
increased by1.51%
Maintainers
2
Install size
1.10 MB
Created
Weekly downloads
 

Changelog

Source

5.0.0 (2023-11-20)

Features

  • provide ts libdefs (246c7c6)

Readme

Source

LCOV Result Merger

npm version Build Status Coverage Status js-standard-style semantic-release

When you have multiple test suites for the same application you still want to have the code coverage across all testsuites.

This tool will handle this for you.

Usage

./node_modules/.bin/lcov-result-merger 'FILE_PATTERN' ['OUTPUT_FILE']

Examples

Use stdout

  1. Generate LCOV Code Coverage into different files, e.g. build/coverage/coverage_X.log
  2. Run ./node_modules/.bin/lcov-result-merger 'build/coverage/coverage_*.log'
  3. Use the stdout to pipe it to e.g. Coveralls
  4. Done.

Use merged output file

  1. Generate LCOV Code Coverage into different files, e.g. build/coverage/coverage_X.log
  2. Run ./node_modules/.bin/lcov-result-merger 'build/coverage/coverage_*.log' 'target/coverage/coverage_merged.log'
  3. Done. Enjoy your merged file.

Prepend source file paths

Modify source file paths to be relative to the working directory that the merge operation was run in. Useful in monorepos where each child package gathers its own metrics.

./node_modules/.bin/lcov-result-merger 'FILE_PATTERN' ['OUTPUT_FILE'] --prepend-source-files

Since coverage output is rarely written directly into the project root, use --prepend-path-fix to describe the relative path between the lcov file and the project root. The default simply points to one directory up, "..", which works well for common tools such as NYC that write to a /coverage directory.

./node_modules/.bin/lcov-result-merger 'FILE_PATTERN' ['OUTPUT_FILE'] --prepend-source-files --prepend-path-fix "../src"

Keywords

FAQs

Last updated on 20 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc