summaryrefslogtreecommitdiff
path: root/src/bin/subplot.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-11-27 18:04:24 +0200
committerLars Wirzenius <liw@liw.fi>2021-11-27 19:00:01 +0200
commit5b54da926b996819dacf69056020f02cba464c3d (patch)
tree4001b7b22cc9317f41fa0e98e45674346b8fab61 /src/bin/subplot.rs
parent1d317988771b05d9850718957befbba8cd90016e (diff)
downloadsubplot-5b54da926b996819dacf69056020f02cba464c3d.tar.gz
feat: warn about unused embedded files
This is merely a warning, for now, to stderr. subplot.md has two embedded files used as examples, and I'm too tired to add a way to indicate that it's OK for a specific file to not be used. That should probably be added later, though. Sponsored-by: author
Diffstat (limited to 'src/bin/subplot.rs')
-rw-r--r--src/bin/subplot.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs
index 524535d..3353328 100644
--- a/src/bin/subplot.rs
+++ b/src/bin/subplot.rs
@@ -331,7 +331,9 @@ impl Docgen {
.unwrap_or("");
let template = template.to_string();
event!(Level::TRACE, ?template);
- if !doc.check_named_files_exist(&template)? || !doc.check_matched_steps_have_impl(&template)
+ if !doc.check_named_files_exist(&template)?
+ || !doc.check_matched_steps_have_impl(&template)
+ || !doc.check_embedded_files_are_used(&template)?
{
eprintln!("Continuing despite warnings");
}