mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
25 lines
634 B
Plaintext
25 lines
634 B
Plaintext
import python
|
|
import Functions.MethodArgNames
|
|
import utils.test.InlineExpectationsTest
|
|
|
|
module MethodArgTest implements TestSig {
|
|
string getARelevantTag() { result = ["shouldBeSelf", "shouldBeCls"] }
|
|
|
|
predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
exists(Function f |
|
|
element = f.toString() and
|
|
location = f.getLocation() and
|
|
value = "" and
|
|
(
|
|
firstArgShouldBeNamedSelfAndIsnt(f) and
|
|
tag = "shouldBeSelf"
|
|
or
|
|
firstArgShouldReferToClsAndDoesnt(f) and
|
|
tag = "shouldBeCls"
|
|
)
|
|
)
|
|
}
|
|
}
|
|
|
|
import MakeTest<MethodArgTest>
|