Skip to content

Commit 837f16c

Browse files
committed
Swift: Address singleton set literal warning
1 parent 74274e8 commit 837f16c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-swift.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ The following global taint-tracking query finds places where a value from a remo
267267
268268
predicate isSink(DataFlow::Node node) {
269269
exists(CallExpr call |
270-
call.getStaticTarget().(MethodDecl).hasQualifiedName("Connection", ["execute(_:)"]) and
270+
call.getStaticTarget().(MethodDecl).hasQualifiedName("Connection", "execute(_:)") and
271271
call.getArgument(0).getExpr() = node.asExpr()
272272
)
273273
}

swift/ql/examples/snippets/simple_sql_injection.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module SqlInjectionConfig implements DataFlow::ConfigSig {
1717

1818
predicate isSink(DataFlow::Node node) {
1919
exists(CallExpr call |
20-
call.getStaticTarget().(MethodDecl).hasQualifiedName("Connection", ["execute(_:)"]) and
20+
call.getStaticTarget().(MethodDecl).hasQualifiedName("Connection", "execute(_:)") and
2121
call.getArgument(0).getExpr() = node.asExpr()
2222
)
2323
}

0 commit comments

Comments
 (0)