summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2024-01-07 16:24:56 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2024-01-07 16:24:56 +0000
commit4bb560e9e06abe7276a6e8db396334b0798a5409 (patch)
treef623c38416166a1bf010f0cb35e12e4319013404
parentbae745ef71885cddef7bc52306654e6aade01e31 (diff)
downloadsubplot-4bb560e9e06abe7276a6e8db396334b0798a5409.tar.gz
cli: If no template available, don't lint the impls
-rw-r--r--src/bin/subplot.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs
index 018ae5b..8dc8973 100644
--- a/src/bin/subplot.rs
+++ b/src/bin/subplot.rs
@@ -496,7 +496,12 @@ fn load_linted_doc(
doc.check_bindings(&mut warnings)?;
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);
+ if !template.is_empty() {
+ // We have a template, let's check we have implementations
+ doc.check_matched_steps_have_impl(&template, &mut warnings);
+ } else {
+ trace!("No template found, so cannot check impl presence");
+ }
doc.check_embedded_files_are_used(&template, &mut warnings)?;
for w in warnings.warnings() {