mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
fail when an example doesn't set doc-scrape-examples (#12964)
# Objective - Ensure that all examples are scrapped for doc ## Solution - Panic in the example tool when an example doesn't specify `doc-scrape-examples` - If an example must not be scrapped, it can set the value to false
This commit is contained in:
parent
0256dacba4
commit
62f2a73cac
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,9 @@ fn parse_examples(panic_on_missing: bool) -> Vec<Example> {
|
|||
if panic_on_missing && metadatas.get(&technical_name).is_none() {
|
||||
panic!("Missing metadata for example {technical_name}");
|
||||
}
|
||||
if panic_on_missing && val.get("doc-scrape-examples").is_none() {
|
||||
panic!("Example {technical_name} is missing doc-scrape-examples");
|
||||
}
|
||||
|
||||
if metadatas
|
||||
.get(&technical_name)
|
||||
|
|
Loading…
Reference in a new issue