mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Exclude .kt files from resource leak queries
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
| CloseReader.kt:4:20:4:45 | new FileReader(...) | This FileReader is not always closed on method exit. |
|
||||
|
||||
@@ -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. |
|
||||
|
||||
Reference in New Issue
Block a user