coverage transform
Transform coverage data to the Qlty format
The qlty coverage transform
command converts code coverage reports from their original formats into a generic format named qlty
. It supports various input formats, including lcov
, cobertura
, jacoco
, and clover
.
In addition to converting reports to the qlty
format, this command can add or remove prefixes from file paths, print the transformed report, and output the results in JSON format. It is typically used in conjunction with the coverage publish
command as an intermediate step to upload the transformed report to Qlty Cloud for analysis, particularly in sophisticated CI setups that implement Parallel Testing or other advanced configurations.
Arguments
<PATH>
The path to the coverage report, which may include its format (e.g., ‘lcov:./coverage/lcov.info’)
--dry-run
Do not transform the coverage report, only simulate the transformation
--report-format <REPORT_FORMAT>
The format of the coverage report to transform. If not specified, the format will be inferred from the file extension or contents [possible values: simplecov, clover, cobertura, coverprofile, lcov, jacoco, qlty]
--add-prefix <ADD_PREFIX>
The prefix to add to file paths in coverage payloads. This helps to match the file paths with the project’s directory structure
--strip-prefix <STRIP_PREFIX>
The prefix to remove from absolute paths in coverage payloads to make them relative to the project root. This is usually the directory in which the tests were run. Defaults to the root of the git repository
--output
The output file name for the transformed coverage report. If not specified, the report will be saved to ‘coverage.jsonl’