Skip to content

Commit 16fc42a

Browse files
committed
Swift: fix formatting
1 parent 91a151e commit 16fc42a

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

swift/ql/lib/codeql/swift/controlflow/internal/ControlFlowElements.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ private predicate isPropertySetterElement(Accessor accessor, AssignExpr assign)
6969
)
7070
}
7171

72-
predicate isPropertySetterElement(
73-
PropertySetterElement pse, Accessor accessor, AssignExpr assign
74-
) {
72+
predicate isPropertySetterElement(PropertySetterElement pse, Accessor accessor, AssignExpr assign) {
7573
pse = TPropertySetterElement(accessor, assign)
7674
}
7775

swift/ql/lib/codeql/swift/dataflow/ExternalFlow.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,7 @@ private string paramsStringPart(Function c, int i) {
397397
* Parameter types are represented by their type erasure.
398398
*/
399399
cached
400-
string paramsString(Function c) {
401-
result = concat(int i | | paramsStringPart(c, i) order by i)
402-
}
400+
string paramsString(Function c) { result = concat(int i | | paramsStringPart(c, i) order by i) }
403401

404402
bindingset[func]
405403
predicate matchesSignature(Function func, string signature) {

swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImplSpecific.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ DataFlowType getSyntheticGlobalType(SummaryComponent::SyntheticGlobal sg) { any(
5858
* Holds if an external flow summary exists for `c` with input specification
5959
* `input`, output specification `output`, kind `kind`, and provenance `provenance`.
6060
*/
61-
predicate summaryElement(
62-
Function c, string input, string output, string kind, string provenance
63-
) {
61+
predicate summaryElement(Function c, string input, string output, string kind, string provenance) {
6462
exists(
6563
string namespace, string type, boolean subtypes, string name, string signature, string ext
6664
|

swift/ql/lib/codeql/swift/security/UnsafeJsEvalExtensions.qll

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ private class WKWebViewDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
5151
private class WKUserContentControllerDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
5252
WKUserContentControllerDefaultUnsafeJsEvalSink() {
5353
any(CallExpr ce |
54-
ce.getStaticTarget()
55-
.(Method)
56-
.hasQualifiedName("WKUserContentController", "addUserScript(_:)")
54+
ce.getStaticTarget().(Method).hasQualifiedName("WKUserContentController", "addUserScript(_:)")
5755
).getArgument(0).getExpr() = this.asExpr()
5856
}
5957
}
@@ -89,9 +87,9 @@ private class JSContextDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
8987
*/
9088
private class JSEvaluateScriptDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
9189
JSEvaluateScriptDefaultUnsafeJsEvalSink() {
92-
any(CallExpr ce |
93-
ce.getStaticTarget().(FreeFunction).hasName("JSEvaluateScript(_:_:_:_:_:_:)")
94-
).getArgument(1).getExpr() = this.asExpr()
90+
any(CallExpr ce | ce.getStaticTarget().(FreeFunction).hasName("JSEvaluateScript(_:_:_:_:_:_:)"))
91+
.getArgument(1)
92+
.getExpr() = this.asExpr()
9593
}
9694
}
9795

swift/ql/lib/codeql/swift/security/UnsafeWebViewFetchExtensions.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ private class UIKitWebKitWebViewFetchSink extends UnsafeWebViewFetchSink {
3838
Expr baseUrl;
3939

4040
UIKitWebKitWebViewFetchSink() {
41-
exists(
42-
Method funcDecl, CallExpr call, string className, string funcName, int arg, int baseArg
43-
|
41+
exists(Method funcDecl, CallExpr call, string className, string funcName, int arg, int baseArg |
4442
// arguments to method calls...
4543
(
4644
// `loadHTMLString`

swift/ql/test/TestUtils.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
private import codeql.swift.elements
22
private import codeql.swift.generated.ParentChild
3-
43
// Internal classes are not imported by the tests:
54
import codeql.swift.elements.expr.InitializerRefCallExpr
65
import codeql.swift.elements.expr.DotSyntaxCallExpr

0 commit comments

Comments
 (0)