Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4454ef7

Browse files
committed
Kotlin: Add tests for long comments
1 parent 9af99c5 commit 4454ef7

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| long_comments.kt:11:1:11:1048575 | long_comments.kt:11:1:11:1048575 | 1048575 | //A01...BBBBC | KtComment |
2+
| long_comments.kt:12:1:12:1048576 | long_comments.kt:12:1:12:1048576 | 1048576 | //A02...BBBCD | KtComment |
3+
| long_comments.kt:13:1:13:1048577 | long_comments.kt:13:1:13:1048577 | 1048576 | //A03...BBBCD | KtComment |
4+
| long_comments.kt:14:1:14:1048578 | long_comments.kt:14:1:14:1048578 | 1048576 | //A04...BBBCD | KtComment |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import java
2+
3+
from KtComment c, string s, int len
4+
where s = c.getText()
5+
and len = s.length()
6+
// Ignore the comments that are describing what's going on, and only
7+
// select the large ones
8+
and len > 1000
9+
select c.getLocation(),
10+
len,
11+
s.prefix(5) + "..." + s.suffix(len - 5),
12+
c.getPrimaryQlClasses()

java/ql/test/kotlin/library-tests/trap/long_comments.kt

Lines changed: 15 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)