Kotlin: Exclude .kt files from non serializable field query

This commit is contained in:
Tamas Vajk
2022-11-16 15:30:25 +01:00
parent a9023d06d0
commit 7d9ce53080
2 changed files with 1 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ predicate exceptions(Class c, Field f) {
from Class c, Field f, string reason
where
c.fromSource() and
c.getFile().isJavaSourceFile() and
c.getAStrictAncestor() instanceof TypeSerializable and
f.getDeclaringType() = c and
not exceptions(c, f) and

View File

@@ -1 +0,0 @@
| NonSerializableFieldTest.kt:3:22:3:28 | <dispatchReceiver> | This field is in a serializable class, but is not serializable itself because Foo is not serializable. |