Skip to content

Commit a5d2299

Browse files
committed
Ruby: Autoformat
1 parent 8d97fe9 commit a5d2299

38 files changed

+143
-74
lines changed

ruby/downgrades/3595c826de6db850f16b9da265a54dbf24dd3126/ruby_do_block_child.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ class AstNode extends @ruby_ast_node {
55
from AstNode ruby_do_block, AstNode body, int index, AstNode child
66
where ruby_do_block_body(ruby_do_block, body) and ruby_body_statement_child(body, index, child)
77
select ruby_do_block, index, child
8-

ruby/downgrades/3595c826de6db850f16b9da265a54dbf24dd3126/ruby_module_child.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ class AstNode extends @ruby_ast_node {
55
from AstNode ruby_module, AstNode body, int index, AstNode child
66
where ruby_module_body(ruby_module, body) and ruby_body_statement_child(body, index, child)
77
select ruby_module, index, child
8-

ruby/downgrades/3595c826de6db850f16b9da265a54dbf24dd3126/ruby_singleton_class_child.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ class AstNode extends @ruby_ast_node {
33
}
44

55
from AstNode ruby_singleton_class, AstNode body, int index, AstNode child
6-
where ruby_singleton_class_body(ruby_singleton_class, body) and ruby_body_statement_child(body, index, child)
6+
where
7+
ruby_singleton_class_body(ruby_singleton_class, body) and
8+
ruby_body_statement_child(body, index, child)
79
select ruby_singleton_class, index, child
8-

ruby/ql/lib/codeql/ruby/Concepts.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ module FileSystemWriteAccess {
212212
* Extend this class to refine existing API models. If you want to model new APIs,
213213
* extend `FileSystemPermissionModification::Range` instead.
214214
*/
215-
class FileSystemPermissionModification extends DataFlow::Node instanceof FileSystemPermissionModification::Range {
215+
class FileSystemPermissionModification extends DataFlow::Node instanceof FileSystemPermissionModification::Range
216+
{
216217
/**
217218
* Gets an argument to this permission modification that is interpreted as a
218219
* set of permissions.
@@ -468,7 +469,8 @@ module Http {
468469
}
469470
}
470471

471-
private class RequestInputAccessAsRemoteFlowSource extends RemoteFlowSource::Range instanceof RequestInputAccess {
472+
private class RequestInputAccessAsRemoteFlowSource extends RemoteFlowSource::Range instanceof RequestInputAccess
473+
{
472474
override string getSourceType() { result = this.(RequestInputAccess).getSourceType() }
473475
}
474476

@@ -957,7 +959,8 @@ module Path {
957959
* Extend this class to refine existing API models. If you want to model new APIs,
958960
* extend `CookieSecurityConfigurationSetting::Range` instead.
959961
*/
960-
class CookieSecurityConfigurationSetting extends DataFlow::Node instanceof CookieSecurityConfigurationSetting::Range {
962+
class CookieSecurityConfigurationSetting extends DataFlow::Node instanceof CookieSecurityConfigurationSetting::Range
963+
{
961964
/**
962965
* Gets a description of how this cookie setting may weaken application security.
963966
* This predicate has no results if the setting is considered to be safe.
@@ -1037,7 +1040,8 @@ module Cryptography {
10371040
* Extend this class to refine existing API models. If you want to model new APIs,
10381041
* extend `CryptographicOperation::Range` instead.
10391042
*/
1040-
class CryptographicOperation extends SC::CryptographicOperation instanceof CryptographicOperation::Range {
1043+
class CryptographicOperation extends SC::CryptographicOperation instanceof CryptographicOperation::Range
1044+
{
10411045
/** DEPRECATED: Use `getAlgorithm().isWeak() or getBlockMode().isWeak()` instead */
10421046
deprecated predicate isWeak() { super.isWeak() }
10431047
}

ruby/ql/lib/codeql/ruby/ast/Literal.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ class StringTextComponent extends StringComponent instanceof StringTextComponent
199199
/**
200200
* An escape sequence component of a string or string-like literal.
201201
*/
202-
class StringEscapeSequenceComponent extends StringComponent instanceof StringEscapeSequenceComponentImpl {
202+
class StringEscapeSequenceComponent extends StringComponent instanceof StringEscapeSequenceComponentImpl
203+
{
203204
final override string getAPrimaryQlClass() { result = "StringEscapeSequenceComponent" }
204205

205206
/** Gets the text of this component as it appears in the source code. */
@@ -209,7 +210,8 @@ class StringEscapeSequenceComponent extends StringComponent instanceof StringEsc
209210
/**
210211
* An interpolation expression component of a string or string-like literal.
211212
*/
212-
class StringInterpolationComponent extends StringComponent, StmtSequence instanceof StringInterpolationComponentImpl {
213+
class StringInterpolationComponent extends StringComponent, StmtSequence instanceof StringInterpolationComponentImpl
214+
{
213215
private Ruby::Interpolation g;
214216

215217
StringInterpolationComponent() { this = TStringInterpolationComponentNonRegexp(g) }
@@ -249,14 +251,16 @@ class RegExpTextComponent extends RegExpComponent instanceof RegExpTextComponent
249251
/**
250252
* An escape sequence component of a regex literal.
251253
*/
252-
class RegExpEscapeSequenceComponent extends RegExpComponent instanceof RegExpEscapeSequenceComponentImpl {
254+
class RegExpEscapeSequenceComponent extends RegExpComponent instanceof RegExpEscapeSequenceComponentImpl
255+
{
253256
final override string getAPrimaryQlClass() { result = "RegExpEscapeSequenceComponent" }
254257
}
255258

256259
/**
257260
* An interpolation expression component of a regex literal.
258261
*/
259-
class RegExpInterpolationComponent extends RegExpComponent, StmtSequence instanceof RegExpComponentImpl {
262+
class RegExpInterpolationComponent extends RegExpComponent, StmtSequence instanceof RegExpComponentImpl
263+
{
260264
private Ruby::Interpolation g;
261265

262266
RegExpInterpolationComponent() { this = TStringInterpolationComponentRegexp(g) }

ruby/ql/lib/codeql/ruby/ast/Parameter.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ deprecated class PatternParameter extends Parameter, Pattern, TPatternParameter
8585
* A parameter defined using a tuple pattern.
8686
*/
8787
deprecated class TuplePatternParameter extends PatternParameter, TuplePattern,
88-
TDestructuredParameter {
88+
TDestructuredParameter
89+
{
8990
final override LocalVariable getAVariable() { result = TuplePattern.super.getAVariable() }
9091
}
9192

ruby/ql/lib/codeql/ruby/ast/internal/Expr.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ abstract class DestructuredLhsExprImpl extends Ruby::AstNode {
101101
}
102102

103103
class DestructuredLeftAssignmentImpl extends DestructuredLhsExprImpl,
104-
Ruby::DestructuredLeftAssignment {
104+
Ruby::DestructuredLeftAssignment
105+
{
105106
override Ruby::AstNode getChildNode(int i) { result = this.getChild(i) }
106107
}
107108

ruby/ql/lib/codeql/ruby/ast/internal/Literal.qll

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ private string unescapeTextComponent(string text) {
326326
}
327327

328328
class StringTextComponentStringOrHeredocContent extends StringTextComponentImpl,
329-
TStringTextComponentNonRegexpStringOrHeredocContent {
329+
TStringTextComponentNonRegexpStringOrHeredocContent
330+
{
330331
private Ruby::Token g;
331332

332333
StringTextComponentStringOrHeredocContent() {
@@ -341,7 +342,8 @@ class StringTextComponentStringOrHeredocContent extends StringTextComponentImpl,
341342
}
342343

343344
private class StringTextComponentSimpleSymbol extends StringTextComponentImpl,
344-
TStringTextComponentNonRegexpSimpleSymbol {
345+
TStringTextComponentNonRegexpSimpleSymbol
346+
{
345347
private Ruby::SimpleSymbol g;
346348

347349
StringTextComponentSimpleSymbol() { this = TStringTextComponentNonRegexpSimpleSymbol(g) }
@@ -355,7 +357,8 @@ private class StringTextComponentSimpleSymbol extends StringTextComponentImpl,
355357
}
356358

357359
private class StringTextComponentHashKeySymbol extends StringTextComponentImpl,
358-
TStringTextComponentNonRegexpHashKeySymbol {
360+
TStringTextComponentNonRegexpHashKeySymbol
361+
{
359362
private Ruby::HashKeySymbol g;
360363

361364
StringTextComponentHashKeySymbol() { this = TStringTextComponentNonRegexpHashKeySymbol(g) }
@@ -424,7 +427,8 @@ private string unescapeEscapeSequence(string escaped) {
424427
* An escape sequence component of a string or string-like literal.
425428
*/
426429
class StringEscapeSequenceComponentImpl extends StringComponentImpl,
427-
TStringEscapeSequenceComponentNonRegexp {
430+
TStringEscapeSequenceComponentNonRegexp
431+
{
428432
private Ruby::EscapeSequence g;
429433

430434
StringEscapeSequenceComponentImpl() { this = TStringEscapeSequenceComponentNonRegexp(g) }
@@ -439,7 +443,8 @@ class StringEscapeSequenceComponentImpl extends StringComponentImpl,
439443
}
440444

441445
class StringInterpolationComponentImpl extends StringComponentImpl,
442-
TStringInterpolationComponentNonRegexp {
446+
TStringInterpolationComponentNonRegexp
447+
{
443448
private Ruby::Interpolation g;
444449

445450
StringInterpolationComponentImpl() { this = TStringInterpolationComponentNonRegexp(g) }
@@ -472,7 +477,8 @@ class RegExpTextComponentImpl extends RegExpComponentImpl, TStringTextComponentR
472477
}
473478

474479
class RegExpEscapeSequenceComponentImpl extends RegExpComponentImpl,
475-
TStringEscapeSequenceComponentRegexp {
480+
TStringEscapeSequenceComponentRegexp
481+
{
476482
private Ruby::EscapeSequence g;
477483

478484
RegExpEscapeSequenceComponentImpl() { this = TStringEscapeSequenceComponentRegexp(g) }
@@ -488,7 +494,8 @@ class RegExpEscapeSequenceComponentImpl extends RegExpComponentImpl,
488494
}
489495

490496
class RegExpInterpolationComponentImpl extends RegExpComponentImpl,
491-
TStringInterpolationComponentRegexp {
497+
TStringInterpolationComponentRegexp
498+
{
492499
private Ruby::Interpolation g;
493500

494501
RegExpInterpolationComponentImpl() { this = TStringInterpolationComponentRegexp(g) }

ruby/ql/lib/codeql/ruby/ast/internal/Variable.qll

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ private class GlobalVariableAccessReal extends GlobalVariableAccessImpl, TGlobal
607607
final override string toString() { result = g.getValue() }
608608
}
609609

610-
private class GlobalVariableAccessSynth extends GlobalVariableAccessImpl, TGlobalVariableAccessSynth {
610+
private class GlobalVariableAccessSynth extends GlobalVariableAccessImpl, TGlobalVariableAccessSynth
611+
{
611612
private GlobalVariable v;
612613

613614
GlobalVariableAccessSynth() { this = TGlobalVariableAccessSynth(_, _, v) }
@@ -624,7 +625,8 @@ module InstanceVariableAccess {
624625
abstract class InstanceVariableAccessImpl extends VariableAccessImpl, TInstanceVariableAccess { }
625626

626627
private class InstanceVariableAccessReal extends InstanceVariableAccessImpl,
627-
TInstanceVariableAccessReal {
628+
TInstanceVariableAccessReal
629+
{
628630
private Ruby::InstanceVariable g;
629631
private InstanceVariable v;
630632

@@ -636,7 +638,8 @@ private class InstanceVariableAccessReal extends InstanceVariableAccessImpl,
636638
}
637639

638640
private class InstanceVariableAccessSynth extends InstanceVariableAccessImpl,
639-
TInstanceVariableAccessSynth {
641+
TInstanceVariableAccessSynth
642+
{
640643
private InstanceVariable v;
641644

642645
InstanceVariableAccessSynth() { this = TInstanceVariableAccessSynth(_, _, v) }
@@ -664,7 +667,8 @@ private class ClassVariableAccessReal extends ClassVariableAccessRealImpl, TClas
664667
}
665668

666669
private class ClassVariableAccessSynth extends ClassVariableAccessRealImpl,
667-
TClassVariableAccessSynth {
670+
TClassVariableAccessSynth
671+
{
668672
private ClassVariable v;
669673

670674
ClassVariableAccessSynth() { this = TClassVariableAccessSynth(_, _, v) }

ruby/ql/lib/codeql/ruby/controlflow/internal/Completion.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ abstract class ConditionalCompletion extends NormalCompletion {
284284
* A completion that represents evaluation of an expression
285285
* with a Boolean value.
286286
*/
287-
class BooleanCompletion extends ConditionalCompletion, NonNestedNormalCompletion, TBooleanCompletion {
287+
class BooleanCompletion extends ConditionalCompletion, NonNestedNormalCompletion, TBooleanCompletion
288+
{
288289
BooleanCompletion() { this = TBooleanCompletion(value) }
289290

290291
/** Gets the dual Boolean completion. */

0 commit comments

Comments
 (0)