Expand description
Core types and DTOs for covguard.
This crate defines the data transfer objects used throughout covguard, including the report schema, findings, verdicts, and error codes.
Structs§
- Capabilities
- Capabilities block for sensor.report.v1 compliance.
- Code
Info - Metadata for a covguard error code.
- Finding
- A single finding from the coverage analysis.
- Input
Capability - A single input capability with status and optional reason.
- Inputs
- Information about the inputs used for the analysis.
- Inputs
Capability - Input availability for the capabilities block.
- Location
- Location of a finding in the source code.
- Report
- The full coverage report.
- Report
Data - Aggregated data about the coverage analysis.
- Run
- Information about the run timing.
- Tool
- Information about the tool that generated the report.
- Truncation
- Truncation metadata when findings exceed
max_findings. - Verdict
- The overall verdict of the coverage check.
- Verdict
Counts - Counts of findings by severity.
Enums§
- Input
Status - Input availability status for capabilities block.
- Scope
- Scope of lines to evaluate.
- Severity
- Severity level for findings.
- Verdict
Status - Status of the overall verdict.
Constants§
- CHECK_
ID_ RUNTIME - Check ID for runtime/tool errors.
- CODE_
COVERAGE_ BELOW_ THRESHOLD - Error code for diff coverage below threshold.
- CODE_
INVALID_ DIFF - Error code for invalid diff input.
- CODE_
INVALID_ LCOV - Error code for invalid LCOV input.
- CODE_
MISSING_ COVERAGE_ FOR_ FILE - Error code for files with changes but no coverage data.
- CODE_
REGISTRY - Registry of all covguard codes.
- CODE_
RUNTIME_ ERROR - Error code for runtime errors.
- CODE_
UNCOVERED_ LINE - Error code for uncovered changed lines.
- REASON_
BELOW_ THRESHOLD - Reason: Diff coverage is below the configured threshold.
- REASON_
DIFF_ COVERED - Reason: All diff lines are covered.
- REASON_
MISSING_ DIFF - Reason: Diff input was not provided.
- REASON_
MISSING_ LCOV - Reason: LCOV coverage data was not provided.
- REASON_
NO_ CHANGED_ LINES - Reason: Diff contained no changed lines in scope.
- REASON_
SKIPPED - Reason: Evaluation was skipped (e.g., missing inputs in cockpit mode).
- REASON_
TOOL_ ERROR - Reason: A tool/runtime error occurred.
- REASON_
TRUNCATED - Reason: Findings were truncated due to max_findings limit.
- REASON_
UNCOVERED_ LINES - Reason: Some changed lines are uncovered.
- SCHEMA_
ID - Schema identifier for the covguard report format.
- SENSOR_
SCHEMA_ ID - Schema identifier for the sensor.report.v1 format (Cockpit ecosystem).
Functions§
- compute_
fingerprint - Compute a SHA-256 fingerprint from pipe-delimited parts.
- explain
- Lookup code metadata by code string.