summaryrefslogtreecommitdiff
path: root/src/bin/subplot.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2023-06-10 10:31:54 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2023-06-10 10:31:54 +0100
commit07c0e5d66920d4102f29245b0d96e725275271a6 (patch)
treeadce16c2f9a1aae6dc46c41c4208bfa4868d158a /src/bin/subplot.rs
parent5d6978497c7f875172a1907a203500e8a185bac4 (diff)
downloadsubplot-07c0e5d66920d4102f29245b0d96e725275271a6.tar.gz
feat: Warn when named codeblocks lack classes
To both improve debugability when writing scenarios, and also to protect against future incompatibilities which might occur if we add more classes which are appropriate for named code blocks, we require that named blocks have one of `file` or `example` as classes or else we warn. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/bin/subplot.rs')
-rw-r--r--src/bin/subplot.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs
index b23f858..ca1ef5d 100644
--- a/src/bin/subplot.rs
+++ b/src/bin/subplot.rs
@@ -397,6 +397,7 @@ fn load_linted_doc(
let template = template.to_string();
trace!("Template: {:#?}", template);
let mut warnings = Warnings::default();
+ doc.check_named_code_blocks_have_appropriate_class(&mut warnings)?;
doc.check_named_files_exist(&template, &mut warnings)?;
doc.check_matched_steps_have_impl(&template, &mut warnings);
doc.check_embedded_files_are_used(&template, &mut warnings)?;