coverage transform
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 code coverage report (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. This makes paths relative to the project root, typically the directory where tests were run. Defaults to the current working directory.
--output
The output file path for the transformed coverage report. If not specified, the report will
be saved to coverage.jsonl
.