mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Codegen: add @qltest.test_with
This allows to group together related AST classes to reuse the same test source and extraction. For example this is useful for `EnumDecl/EnumCaseDecl/EnumElementDecl`, where this is applied to.
This commit is contained in:
@@ -93,6 +93,7 @@ class Class:
|
||||
doc: List[str] = field(default_factory=list)
|
||||
default_doc_name: Optional[str] = None
|
||||
hideable: bool = False
|
||||
test_with: Optional[str] = None
|
||||
|
||||
@property
|
||||
def final(self):
|
||||
@@ -110,6 +111,7 @@ class Class:
|
||||
if self.synth.on_arguments is not None:
|
||||
for t in self.synth.on_arguments.values():
|
||||
_check_type(t, known)
|
||||
_check_type(self.test_with, known)
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user