Skip to main content

Crate covguard_types

Crate covguard_types 

Source
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.
CodeInfo
Metadata for a covguard error code.
Finding
A single finding from the coverage analysis.
InputCapability
A single input capability with status and optional reason.
Inputs
Information about the inputs used for the analysis.
InputsCapability
Input availability for the capabilities block.
Location
Location of a finding in the source code.
Report
The full coverage report.
ReportData
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.
VerdictCounts
Counts of findings by severity.

Enums§

InputStatus
Input availability status for capabilities block.
Scope
Scope of lines to evaluate.
Severity
Severity level for findings.
VerdictStatus
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.