mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Rust: Halt codegen on code block without ``` terminator
This commit is contained in:
@@ -53,6 +53,7 @@ def generate(opts, renderer):
|
||||
code.append(line)
|
||||
if not has_code:
|
||||
continue
|
||||
assert not adding_code, "Unterminated code block in docstring: " + "\n".join(cls.doc)
|
||||
test_name = inflection.underscore(cls.name)
|
||||
signature = cls.rust_doc_test_function
|
||||
fn = signature and Function(f"test_{test_name}", signature)
|
||||
|
||||
Reference in New Issue
Block a user