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§
- Diff
Parse Result - Result of parsing a diff with metadata.
- GitDiff
Provider - Default diff provider backed by git subprocess calls and unified diff parsing.
Enums§
- Diff
Error - Errors that can occur during diff parsing.
Functions§
- load_
diff_ from_ git - Load unified diff text from git for a
base..headrange. - 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§
- Changed
Ranges - Map of file paths to their changed line ranges.