Skip to content

Commit e464e96

Browse files
committed
Go: UnhandledCloseWritableHandle
1 parent 06a5db4 commit e464e96

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.ql

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,12 @@ module UnhandledFileCloseConfig implements DataFlow::ConfigSig {
129129

130130
predicate isSink(DataFlow::Node sink) { isCloseSink(sink, _) }
131131

132-
predicate observeDiffInformedIncrementalMode() {
133-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 5 does not select a source or sink originating from the flow call on line 147 (/Users/d10c/src/semmle-code/ql/go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.ql@153:3:153:10)
132+
predicate observeDiffInformedIncrementalMode() { any() }
133+
134+
Location getASelectedSourceLocation(DataFlow::Node source) {
135+
exists(DataFlow::CallNode openCall | result = openCall.getLocation() |
136+
isWritableFileHandle(source, openCall)
137+
)
134138
}
135139
}
136140

0 commit comments

Comments
 (0)