Skip to main content

run

Function run 

Source
pub fn run(file_a: &Path, file_b: &Path) -> Result<()>
Expand description

Compare file_a and file_b and print a coloured semantic diff.

Keys present in both files with equal values are shown dimmed. Changed values are shown as - old / + new lines (or redacted for sensitive keys). Keys only in one file are shown as removed (-) or added (+).

§Exit behaviour

Calls std::process::exit(1) when any difference is found so the function can be used as a CI gate.

§Errors

Returns an error if either file cannot be parsed.