Skip to content

Commit dfa5e18

Browse files
committed
Swift: autoformat
1 parent 81a25b2 commit dfa5e18

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -691,13 +691,15 @@ predicate storeStep(Node node1, ContentSet c, Node node2) {
691691
node2 = node1 and // TODO: again, we should ideally have a separate Node case here, and not reuse the CallExpr
692692
c instanceof OptionalSomeContentSet and
693693
init.isFailable()
694-
) or
694+
)
695+
or
695696
// creation of an array `[v1,v2]`
696697
exists(ArrayExpr arr |
697698
node1.asExpr() = arr.getAnElement() and
698699
node2.asExpr() = arr and
699700
c.isSingleton(any(Content::ArrayContent ac))
700-
) or
701+
)
702+
or
701703
// array assignment `a[n] = x`
702704
exists(AssignExpr assign, SubscriptExpr subscript |
703705
node1.asExpr() = assign.getSource() and
@@ -757,7 +759,7 @@ predicate readStep(Node node1, ContentSet c, Node node2) {
757759
)
758760
or
759761
// read of a component in a key-path expression chain
760-
exists(KeyPathComponent component|
762+
exists(KeyPathComponent component |
761763
component = node1.(KeyPathComponentNodeImpl).getComponent() and
762764
(
763765
c.isSingleton(any(Content::FieldContent ct | ct.getField() = component.getDeclRef()))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ module Content {
208208
}
209209

210210
class ArrayContent extends Content, TArrayContent {
211-
override string toString() { result = "Array element"}
211+
override string toString() { result = "Array element" }
212212
}
213213
}
214214

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ private string getContentSpecific(ContentSet cs) {
108108
exists(Content::FieldContent c |
109109
cs.isSingleton(c) and
110110
result = "Field[" + c.getField().getName() + "]"
111-
) or
111+
)
112+
or
112113
exists(Content::ArrayContent c |
113114
cs.isSingleton(c) and
114115
result = "ArrayElement"

swift/ql/lib/codeql/swift/frameworks/StandardLibrary/Array.qll

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ class ArrayType extends BoundGenericType {
1010
*/
1111
private class ArraySummaries extends SummaryModelCsv {
1212
override predicate row(string row) {
13-
row = [
14-
";Array;true;insert(_:at:);;;Argument[0];Argument[-1].ArrayElement;value",
15-
";Array;true;insert(_:at:);;;Argument[1];Argument[-1];taint"
16-
]
13+
row =
14+
[
15+
";Array;true;insert(_:at:);;;Argument[0];Argument[-1].ArrayElement;value",
16+
";Array;true;insert(_:at:);;;Argument[1];Argument[-1];taint"
17+
]
1718
}
1819
}

0 commit comments

Comments
 (0)