Watch
0
0
Fork
You've already forked hyperhive
0

add review classifier rules for this repo

Eight classifications in .hyperhive/review-classifier.yml: no AI
advertising in commit messages, no committed secrets, no clippy
allow attributes, no debug leftovers, no dead code, tests with
behaviour changes, docs with operator-facing changes, one purpose per PR.

A swarm-controller test parses the real file so it can't rot, and the
rust source fileset in nix/rust.nix includes it so the test finds it
in the build sandbox.
This commit is contained in:
atlas 2026-10-12 19:13:49 +02:00 • committed by mara
commit 3b1de422c6
3 changed files with 83 additions and 1 deletions

View file

@ -1087,6 +1087,30 @@ classifications:
assert_eq!(parse_rules(json_path, json.as_bytes()), Ok(want));
}
#[test]
fn this_repos_own_rules_file_loads() {
let [yml_path, _] = RULES_PATHS;
let rules = parse_rules(
yml_path,
include_str!("../../.hyperhive/review-classifier.yml").as_bytes(),
)
.expect("the repo's rules file parses");
let names: Vec<_> = rules.iter().map(|c| c.name.as_str()).collect();
assert_eq!(
names,
[
"no-ads",
"no-secrets",
"no-lint-suppression",
"no-debug-leftovers",
"no-dead-code",
"tests-with-behaviour",
"docs-updated",
"one-purpose",
]
);
}
#[test]
fn a_bad_rules_file_is_an_error_in_either_format() {
let mut unknown_rule_field = datetime();