mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
14 lines
440 B
Plaintext
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 }
|