diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2023-06-10 10:31:54 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2023-06-10 10:31:54 +0100 |
commit | 07c0e5d66920d4102f29245b0d96e725275271a6 (patch) | |
tree | adce16c2f9a1aae6dc46c41c4208bfa4868d158a /src/error.rs | |
parent | 5d6978497c7f875172a1907a203500e8a185bac4 (diff) | |
download | subplot-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/error.rs')
-rw-r--r-- | src/error.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 93a828a..6859aa4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -379,6 +379,10 @@ pub enum Warning { /// Plantuml failed during typesetting. #[error("Markup using plantuml failed: {0}")] Plantuml(String), + + /// A code block has an identifier but is not marked as a file or example + #[error("Code block has identifier but lacks file or example class. Is this a mistake? #{0} at {1}")] + MissingAppropriateClassOnNamedCodeBlock(String, String), } /// A list of warnings. |