Expand description
Scripting support for custom diff analysis using Rhai.
This module provides a scripting interface for customizing diff analysis behavior using the Rhai scripting language. Scripts can define custom analyzers, validators, and transformations.
§Example
use legalis_diff::scripting::ScriptEngine;
let mut engine = ScriptEngine::new();
// Load a script
let script = r#"
fn analyze_diff(diff) {
let change_count = diff.changes.len();
if change_count > 10 {
return #{
severity: "high",
message: "Too many changes"
};
}
return #{
severity: "low",
message: "Normal change count"
};
}
"#;
engine.load_script("analyzer", script).unwrap();Structs§
- Script
Analyzer - A script-based diff analyzer plugin.
- Script
Change - Script-friendly representation of a change.
- Script
Diff - Script-friendly representation of a diff.
- Script
Engine - A scripting engine for custom diff analysis.
- Script
Impact - Script-friendly representation of impact.