Skip to content

Commit 8bc46d5

Browse files
authored
Merge pull request github#11025 from tamasvajk/kotlin-fix-external-location
Kotlin: Fix external location in integration test
2 parents 8628ff5 + 99880c9 commit 8bc46d5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| Test.java:4:22:4:36 | needlessExtends | file:///modules/java.base/java/lang/Iterable.class:0:0:0:0 | Iterable<? extends String> |
1+
| Test.java:4:22:4:36 | needlessExtends | file://<external>/Iterable.class:0:0:0:0 | Iterable<? extends String> |
22
| Test.java:7:22:7:34 | needlessSuper | build1/KotlinConsumer.class:0:0:0:0 | KotlinConsumer<? super Object> |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import java
22

3+
class ClassOrInterfaceLocation extends ClassOrInterface {
4+
override predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
5+
exists(string fullPath | super.hasLocationInfo(fullPath, sl, sc, el, ec) |
6+
if exists(this.getFile().getRelativePath())
7+
then path = fullPath
8+
else path = fullPath.regexpReplaceAll(".*/", "<external>/")
9+
)
10+
}
11+
}
12+
313
from Method m
414
where m.fromSource()
515
select m, m.getAParamType()

0 commit comments

Comments
 (0)