mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
add explicit test of what Parameter[0] matches
This commit is contained in:
@@ -84,6 +84,7 @@ isSource
|
||||
| test.py:85:42:85:52 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:86:49:86:59 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:87:56:87:66 | ControlFlowNode for getSource() | test-source |
|
||||
| test.py:101:29:101:31 | ControlFlowNode for arg | test-source |
|
||||
syntaxErrors
|
||||
| Member[foo |
|
||||
| Member[foo] .Member[bar] |
|
||||
|
||||
@@ -96,3 +96,7 @@ baz1(baz1) # no match, and that's the point.
|
||||
|
||||
from foo2.bar import baz2
|
||||
baz2(baz2) # match
|
||||
|
||||
class OtherSubClass (ArgPos.MyClass):
|
||||
def otherSelfTest(self, arg, named=2, otherName=3): # test that Parameter[0] hits `arg`.
|
||||
pass
|
||||
|
||||
@@ -76,6 +76,7 @@ class Sources extends ModelInput::SourceModelCsv {
|
||||
"testlib;;Member[ArgPos].Member[MyClass].Subclass.Member[foo].Parameter[self];test-source", //
|
||||
"testlib;;Member[ArgPos].Member[MyClass].Subclass.Member[foo].Parameter[named:];test-source", //
|
||||
"testlib;;Member[ArgPos].Member[MyClass].Subclass.Member[secondAndAfter].Parameter[1..];test-source", //
|
||||
"testlib;;Member[ArgPos].Member[MyClass].Subclass.Member[otherSelfTest].Parameter[0];test-source", //
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user