Skip to content

Commit 3d11e5b

Browse files
committed
Exclude .kt files from empty block query
1 parent c91e20c commit 3d11e5b

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

java/ql/src/Likely Bugs/Statements/EmptyBlock.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ predicate blockParent(Stmt empty, string msg) {
5656

5757
from Stmt empty, string msg
5858
where
59+
empty.getFile().isJavaSourceFile() and
5960
empty = emptyBody() and
6061
blockParent(empty, msg)
6162
select empty, msg + " Typographical error or missing code?"
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
| Test.kt:1:1:13:1 | { ... } | This block should not be empty. Typographical error or missing code? |
2-
| Test.kt:2:20:4:5 | { ... } | This block should not be empty. Typographical error or missing code? |
3-
| Test.kt:7:9:8:9 | { ... } | This block should not be empty. Typographical error or missing code? |

0 commit comments

Comments
 (0)