MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / lint_static_predicate

Function lint_static_predicate

nodedb/src/control/security/explain.rs:207–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205
206 #[test]
207 fn lint_static_predicate() {
208 let pred = RlsPredicate::Compare {
209 field: "status".into(),
210 op: CompareOp::Eq,
211 value: PredicateValue::Literal(serde_json::json!("active")),
212 };
213 let warnings = lint_predicate(&pred);
214 assert_eq!(warnings.len(), 1);
215 assert!(warnings[0].contains("static predicate"));
216 }
217
218 #[test]
219 fn lint_auth_ref_clean() {

Callers

nothing calls this directly

Calls 1

lint_predicateFunction · 0.85

Tested by

no test coverage detected