mirror of
https://github.com/github/codeql.git
synced 2025-12-21 03:06:31 +01:00
change getNumArgument to only count positional arguments
This commit is contained in:
@@ -356,7 +356,7 @@ module API {
|
||||
}
|
||||
|
||||
/** Gets the number of arguments of this call. Both positional and named arguments are counted. */
|
||||
int getNumArgument() { result = count([this.getArg(_), this.getArgByName(_)]) }
|
||||
int getNumArgument() { result = count(this.getArg(_)) }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -47,7 +47,8 @@ isSink
|
||||
| test.py:86:8:86:60 | ControlFlowNode for Attribute() | test-sink |
|
||||
| test.py:87:8:87:67 | ControlFlowNode for Attribute() | test-sink |
|
||||
| test.py:89:21:89:23 | ControlFlowNode for one | test-sink |
|
||||
| test.py:90:25:90:27 | ControlFlowNode for one | test-sink |
|
||||
| test.py:91:21:91:23 | ControlFlowNode for one | test-sink |
|
||||
| test.py:91:30:91:32 | ControlFlowNode for two | test-sink |
|
||||
| test.py:98:6:98:9 | ControlFlowNode for baz2 | test-sink |
|
||||
isSource
|
||||
| test.py:3:5:3:15 | ControlFlowNode for getSource() | test-source |
|
||||
|
||||
@@ -87,8 +87,8 @@ mySink(Steps.preserveAllButFirstArgument("foo", getSource())) # FLOW
|
||||
mySink(Steps.preserveAllButFirstArgument("foo", "bar", getSource())) # FLOW
|
||||
|
||||
CallFilter.arityOne(one) # match
|
||||
CallFilter.arityOne(one=one) # match
|
||||
CallFilter.arityOne(one, two=two) # NO match
|
||||
CallFilter.arityOne(one=one) # NO match
|
||||
CallFilter.arityOne(one, two=two) # match - on both the named and positional arguments
|
||||
CallFilter.arityOne(one=one, two=two) # NO match
|
||||
|
||||
from foo1.bar import baz1
|
||||
|
||||
Reference in New Issue
Block a user