Exclude .kt files from autoboxing query

This commit is contained in:
Tamas Vajk
2022-11-16 11:52:17 +01:00
parent 0d9e28012e
commit 3d21f89f1d
2 changed files with 11 additions and 8 deletions

View File

@@ -72,12 +72,16 @@ predicate rebox(Assignment e, Variable v) {
from Expr e, string conv
where
boxed(e) and conv = "This expression is implicitly boxed."
or
unboxed(e) and conv = "This expression is implicitly unboxed."
or
exists(Variable v | rebox(e, v) |
conv =
"This expression implicitly unboxes, updates, and reboxes the value of '" + v.getName() + "'."
e.getFile().isJavaSourceFile() and
(
boxed(e) and conv = "This expression is implicitly boxed."
or
unboxed(e) and conv = "This expression is implicitly unboxed."
or
exists(Variable v | rebox(e, v) |
conv =
"This expression implicitly unboxes, updates, and reboxes the value of '" + v.getName() +
"'."
)
)
select e, conv