Files
codeql/java/ql/test-kotlin1/library-tests/lateinit/test.ql
2023-11-21 15:28:12 +00:00

14 lines
440 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(MethodCall ma, Method m) { ma.getMethod() = m }