Files
codeql/java/ql/integration-tests/posix-only/kotlin/needless-java-wildcards/test.ql
2022-10-28 10:24:14 +02:00

16 lines
453 B
Plaintext

import java
class ClassOrInterfaceLocation extends ClassOrInterface {
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>/")
)
}
}
from Method m
where m.fromSource()
select m, m.getAParamType()