Skip to content

Commit 73d8bf3

Browse files
authored
Merge pull request #1680 from aschackmull/cookbook/autoformat
Cookbook examples: Autoformat
2 parents 54d01bd + 59fb59d commit 73d8bf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+159
-131
lines changed

cpp/ql/examples/snippets/castexpr.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import cpp
1212

1313
from Cast c
14-
where c.getExpr().getType() instanceof FloatingPointType
15-
and c.getType() instanceof IntegralType
14+
where
15+
c.getExpr().getType() instanceof FloatingPointType and
16+
c.getType() instanceof IntegralType
1617
select c

cpp/ql/examples/snippets/catch_exception.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* try
77
* exception
88
*/
9-
9+
1010
import cpp
1111

1212
from CatchBlock catch

cpp/ql/examples/snippets/constructor_call.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* constructor
77
* new
88
*/
9-
9+
1010
import cpp
1111

1212
from NewExpr new, Constructor c

cpp/ql/examples/snippets/derives_from_class.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* subtype
1111
* supertype
1212
*/
13-
13+
1414
import cpp
1515

1616
from Class type

cpp/ql/examples/snippets/eq_true.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* test
88
* boolean
99
*/
10-
10+
1111
import cpp
1212

1313
from EqualityOperation eq, Expr trueExpr

cpp/ql/examples/snippets/field_access.ql

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
* field
77
* read
88
*/
9-
9+
1010
import cpp
1111

1212
from Field f, FieldAccess access
13-
where f.hasName("aDate")
14-
and f.getDeclaringType().hasName("Order")
15-
and f = access.getTarget()
13+
where
14+
f.hasName("aDate") and
15+
f.getDeclaringType().hasName("Order") and
16+
f = access.getTarget()
1617
select access

cpp/ql/examples/snippets/function_call.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* function
77
* method
88
*/
9-
9+
1010
import cpp
1111

1212
from FunctionCall call, Function fcn

cpp/ql/examples/snippets/integer_literal.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @tags integer
66
* literal
77
*/
8-
8+
99
import cpp
1010

1111
from Literal literal

cpp/ql/examples/snippets/throw_exception.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* throw
88
* exception
99
*/
10-
10+
1111
import cpp
1212

1313
from ThrowExpr throw

csharp/ql/examples/snippets/cast_expr.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import csharp
1212

1313
from CastExpr c
14-
where c.getExpr().getType() instanceof FloatingPointType
15-
and c.getType() instanceof IntegralType
14+
where
15+
c.getExpr().getType() instanceof FloatingPointType and
16+
c.getType() instanceof IntegralType
1617
select c

0 commit comments

Comments
 (0)