pub fn parse_rule(yaml: &str) -> Result<Rule, RuleError>Expand description
Parse a single YAML string into a Rule, validating required fields.
A rule carries exactly one matcher: an ast-grep rule, a file-level
metric plus its threshold, or a project-wide cross_file kind.