Files
codeql/java/ql/test/kotlin/library-tests/lateinit/test.ql
2022-10-05 16:09:00 +02:00

14 lines
442 B
Plaintext

import java
class MethodLocation extends Method {
override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
exists(string fullPath | super.hasLocationInfo(fullPath, sl, sc, el, ec) |
if exists(this.getFile().getRelativePath())
then path = fullPath
else path = fullPath.regexpReplaceAll(".*/", "<external>/")
)
}
}
query predicate calls(MethodAccess ma, Method m) { ma.getMethod() = m }