(sh: &Shell)
| 620 | /// Update JSON schema files |
| 621 | #[context("Updating JSON schemas")] |
| 622 | fn update_json_schemas(sh: &Shell) -> Result<()> { |
| 623 | for (of, target) in JSON_SCHEMAS { |
| 624 | let schema = generate_normalized_json_schema(sh, of)?; |
| 625 | std::fs::write(target, &schema)?; |
| 626 | println!("Updated {target}"); |
| 627 | } |
| 628 | Ok(()) |
| 629 | } |
| 630 | |
| 631 | /// Check that JSON schema files are up to date. |
| 632 | /// Fails with an error if any file would change, similar to `cargo fmt --check`. |
no test coverage detected