1.0.2 • Published 5 years ago

llvm-coverage-viewer v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

llvm-coverage-viewer

I thought my tests covered that!

Prerequisites

  • node - any version
  • npm - any version

Prerequisites For Development

Features

  • outputs only one html file
  • syntax highlighting
  • highlights missed code coverage
  • filter files by name
  • collapsible folder tree ui
  • uses react and material-ui

Install

npm install -g llvm-coverage-viewer

Usage

After you've successfully exported your llvm coverage report as JSON, the following command will generate a beautiful report.

llvm-coverage-viewer -j json_report.json -o html_report.html

How do I export llvm code coverage to JSON?

Use the llvm-cov export command.

I created an example C++ project to generate and export llvm code coverage to JSON document for testing and development.

llvm-cov report "<executable>" -instr-profile="all.profdata"

Development

The following commands should start the development server so you can start coding. If you want to load a different llvm code coverage report while developing, you can change it by modifying the hardcoded path here

# build example c++ project
cd test/fixtures/cpp_project
./build_report_fixture.sh

npm install
npm start