Exclude .kt files from resource leak queries

This commit is contained in:
Tamas Vajk
2022-11-16 09:52:39 +01:00
parent acab8e8632
commit 307d2d5dc1
5 changed files with 3 additions and 9 deletions

View File

@@ -33,6 +33,7 @@ predicate safeReaderType(RefType t) {
from ClassInstanceExpr cie, RefType t
where
cie.getFile().isJavaSourceFile() and
badCloseableInit(cie) and
cie.getType() = t and
readerType(t) and

View File

@@ -15,6 +15,7 @@ import CloseType
from CloseableInitExpr cie, RefType t
where
cie.getFile().isJavaSourceFile() and
badCloseableInit(cie) and
cie.getType() = t and
sqlType(t) and

View File

@@ -29,6 +29,7 @@ predicate safeWriterType(RefType t) {
from ClassInstanceExpr cie, RefType t
where
cie.getFile().isJavaSourceFile() and
badCloseableInit(cie) and
cie.getType() = t and
writerType(t) and

View File

@@ -1 +0,0 @@
| CloseReader.kt:4:20:4:45 | new FileReader(...) | This FileReader is not always closed on method exit. |

View File

@@ -1,8 +0,0 @@
| CloseWriter.kt:4:29:4:54 | new FileWriter(...) | This FileWriter is not always closed on method exit. |
| CloseWriter.kt:9:20:9:45 | new FileWriter(...) | This FileWriter is not always closed on method exit. |
| CloseWriter.kt:15:14:15:57 | new FileOutputStream(...) | This FileOutputStream is not always closed on method exit. |
| CloseWriter.kt:20:5:20:48 | new FileOutputStream(...) | This FileOutputStream is not always closed on method exit. |
| CloseWriter.kt:26:33:26:76 | new FileOutputStream(...) | This FileOutputStream is not always closed on method exit. |
| CloseWriter.kt:31:24:31:67 | new FileOutputStream(...) | This FileOutputStream is not always closed on method exit. |
| CloseWriter.kt:37:33:37:76 | new FileOutputStream(...) | This FileOutputStream is not always closed on method exit. |
| CloseWriter.kt:42:24:42:67 | new FileOutputStream(...) | This FileOutputStream is not always closed on method exit. |