This is a GSoC 2023 project (discourse link).
llvm-cov currently generates a single top-level index HTML file, which causes rendering scalability issues in large projects. This patch adds support for hierarchical directory structure into the HTML reports to solve scalability issues by introducing the following changes:
- Added a new command line option --show-directory-coverage for llvm-cov show. It works both for --format=html and --format=text.
- Two new classes: CoveragePrinterHTMLDirectory and CoveragePrinterTextDirectory was added to support the new option.
- A tool class DirectoryCoverageReport was added to support the two classes above.
- Updated the document.
- Added a new regression test for --show-directory-coverage.
Here is a coverage report preview of LLVM:
Can you please make sure that you only format the lines that you change, and not format the file whole file? This makes it easier for the reviewers to see the actual changes instead of formatting changes? AFAICT, most of the changes in CoverageReport.h and CoverageReport.cpp are formatting changes.