Skip to main content

Crate covguard_adapters_diff

Crate covguard_adapters_diff 

Source
Expand description

Diff parsing adapters for covguard.

This crate provides a unified diff parser that extracts changed line ranges from patch files or git diff output.

Structs§

DiffParseResult
Result of parsing a diff with metadata.
GitDiffProvider
Default diff provider backed by git subprocess calls and unified diff parsing.

Enums§

DiffError
Errors that can occur during diff parsing.

Functions§

load_diff_from_git
Load unified diff text from git for a base..head range.
merge_ranges
Re-exported range-merging utility for backward compatibility. Merge overlapping or adjacent ranges into a minimal set.
normalize_path
Normalize a path from a diff header to repo-relative format.
parse_patch
Parse a unified diff/patch and extract changed (added) line ranges.
parse_patch_with_meta
Parse a unified diff/patch and extract changed (added) line ranges with metadata.

Type Aliases§

ChangedRanges
Map of file paths to their changed line ranges.