Skip to main content

evaluate_corpus

Function evaluate_corpus 

Source
pub fn evaluate_corpus(
    rules_path: &Path,
    corpus: &str,
    opts: &EvalOptions,
) -> Result<Vec<DecisionLine>>
Expand description

Run the engine at rules_path over the JSON-Lines corpus, returning one DecisionLine per non-blank, non-comment input line in order. Invalid JSON lines map to an “allow” decision with a sentinel reason so the index pairing in the diff stays aligned with the corpus.