pub fn definitions(index: &Index) -> Vec<RuleDefinition>Expand description
Every rule the index holds, as a canonical definition.
The denominator is read from the index, so a rule added tomorrow is measured tomorrow and this function never carries a list of what exists.
use majordomus_cli::rules::definitions;
use majordomus_cli::synthetic::SyntheticRepository;
let repo = SyntheticRepository::small().unwrap();
let defs = definitions(&repo.index().unwrap());
assert_eq!(defs.len(), repo.shape.rules);