(dir: &Path, names: &mut BTreeSet<String>)
| 400 | |
| 401 | #[test] |
| 402 | fn docs_do_not_use_generic_api_placeholder_prose() { |
| 403 | let banned = [ |
| 404 | "Use when this exact typed operation matches the system state the script needs to read or change.", |
| 405 | "Option returns None for missing data", |
| 406 | "ID-based calls fail when the ID is stale", |
| 407 | ]; |
| 408 | |
| 409 | let mut failures = Vec::new(); |
| 410 | for doc in docs() { |
| 411 | if doc.collection != "docs" { |
| 412 | continue; |
| 413 | } |
| 414 | for needle in banned { |
| 415 | if doc.markdown.contains(needle) { |
| 416 | failures.push(format!("{} contains placeholder prose", doc.slug)); |
| 417 | } |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | assert!(failures.is_empty(), "{}", failures.join("\n")); |
| 422 | } |
| 423 | |
| 424 | #[test] |
no test coverage detected