From 4bb560e9e06abe7276a6e8db396334b0798a5409 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 7 Jan 2024 16:24:56 +0000 Subject: cli: If no template available, don't lint the impls --- src/bin/subplot.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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() { -- cgit v1.2.1