Skip to content

Commit 777b845

Browse files
committed
[DIFF-INFORMED] Go: UnhandledCloseWritableHandle
1 parent e74d0ac commit 777b845

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.ql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,14 @@ module UnhandledFileCloseConfig implements DataFlow::ConfigSig {
128128
predicate isSource(DataFlow::Node source) { isWritableFileHandle(source, _) }
129129

130130
predicate isSink(DataFlow::Node sink) { isCloseSink(sink, _) }
131+
132+
predicate observeDiffInformedIncrementalMode() { any() }
133+
134+
Location getASelectedSourceLocation(DataFlow::Node source) {
135+
exists(DataFlow::CallNode openCall | result = openCall.getLocation() |
136+
isWritableFileHandle(source, openCall)
137+
)
138+
}
131139
}
132140

133141
/**

0 commit comments

Comments
 (0)