mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Rust: codegen
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
After a source file is added in this directory and codegen is run again, test queries
|
||||
will appear and this file will be deleted
|
||||
14
rust/ql/test/extractor-tests/generated/Module/Module.ql
generated
Normal file
14
rust/ql/test/extractor-tests/generated/Module/Module.ql
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from Module x, int getNumberOfAttrs, string hasItemList, string hasName, string hasVisibility
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
getNumberOfAttrs = x.getNumberOfAttrs() and
|
||||
(if x.hasItemList() then hasItemList = "yes" else hasItemList = "no") and
|
||||
(if x.hasName() then hasName = "yes" else hasName = "no") and
|
||||
if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no"
|
||||
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasItemList:", hasItemList, "hasName:", hasName,
|
||||
"hasVisibility:", hasVisibility
|
||||
7
rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/Module/Module_getAttr.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from Module x, int index
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, index, x.getAttr(index)
|
||||
7
rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/Module/Module_getItemList.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from Module x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getItemList()
|
||||
7
rust/ql/test/extractor-tests/generated/Module/Module_getName.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/Module/Module_getName.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from Module x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getName()
|
||||
7
rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/Module/Module_getVisibility.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from Module x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getVisibility()
|
||||
7
rust/ql/test/extractor-tests/generated/Module/gen_module.rs
generated
Normal file
7
rust/ql/test/extractor-tests/generated/Module/gen_module.rs
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
// A module declaration. For example:
|
||||
mod foo;
|
||||
mod bar {
|
||||
pub fn baz() {}
|
||||
}
|
||||
Reference in New Issue
Block a user