Skip to main content

Module engine

Module engine 

Source
Expand description

The deterministic rule engine.

Given a snapshot and a config, run evaluates every built-in rule and returns a sorted, deduplicated Vec<Violation>. The sort key is (rule_id, viewport, selector, dom_order) — see docs/local/prd.md §9.

Structs§

RunReport
A partitioned engine result: reported and ignored violations split according to the active [[ignore]] config entries.

Functions§

apply_ignores
Partition violations into (reported, ignored) according to ignores.
run
Run every built-in rule against the snapshot. Output is sorted and deduplicated before return.
run_many
Run every built-in rule against each snapshot in snapshots and return their merged, sorted, deduplicated violation list.
run_report
Like run_many but returns a RunReport partitioning the violation set into reported vs. ignored according to config.ignore.