Builds a coverage report in the requested format and determines the gate verdict.

Does not print to stdout or raise exceptions on gate failure.

Raises: ValueError: when threshold is not within the valid 0.0-1.0 fraction range.

Returns:

A 3-tuple of (report_text, gate_passed, coverage_report).

Methods

build_coverage_report

build_coverage_report(catalog: ProjectCatalog, threshold: float, mode: str, report_format: str, extra_findings: Optional], include_doc_quality: bool, audit_report_root: Optional]) -> tuple[str, bool, CoverageReport]

Builds a coverage report in the requested format and determines the gate verdict.

Does not print to stdout or raise exceptions on gate failure.

Raises: ValueError: when threshold is not within the valid 0.0-1.0 fraction range.

Returns:

A 3-tuple of (report_text, gate_passed, coverage_report).

ParameterTypeDescription
catalogProjectCatalogThe parsed project catalog to compute coverage over.
thresholdfloatFraction (e.g. 0.98 for 98%) below which the gate fails
modestr“allow-undocumented” (informational only) or “reject-undocumented”.
report_formatstrOutput format for the coverage report. One of “markdown”,
extra_findingsOptional]Optional precomputed list of extra findings to merge.
include_doc_qualityboolIf True and extra_findings is None, computes doc
audit_report_rootOptional]Optional root directory to relativize finding URIs against.

Generated with Flude

Copyright © 2026