Skip to main content

dry_run_diff

Function dry_run_diff 

Source
pub fn dry_run_diff(original: &str, proposed: &str, path: &Path) -> DryRunResult
Expand description

Compute a unified diff between original and proposed content, plus syntax validation.

Returns a standard unified diff with a/ and b/ path prefixes and 3 lines of context. Also validates syntax of the proposed content via tree-sitter.