Filter out test rules in RuleSelector JSON schema (#9901)

This commit is contained in:
Micha Reiser 2024-02-08 22:06:51 +01:00 committed by GitHub
parent fe7d965334
commit 49c5e715f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View file

@ -321,6 +321,15 @@ mod schema {
true
}
})
.filter(|rule| {
// Filter out all test-only rules
#[cfg(feature = "test-rules")]
if rule.starts_with("RUF9") {
return false;
}
true
})
.sorted()
.map(Value::String)
.collect(),