Skip to content

Commit 5ad7ed4

Browse files
committed
C#: Autoformat
1 parent 730eae9 commit 5ad7ed4

37 files changed

+226
-114
lines changed

csharp/ql/lib/semmle/code/cil/Method.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class MethodImplementation extends EntryPoint, @cil_method_implementation {
6767
* destructors, operators, accessors and so on.
6868
*/
6969
class Method extends DotNet::Callable, Element, Member, TypeContainer, DataFlowNode,
70-
CustomModifierReceiver, Parameterizable, @cil_method {
70+
CustomModifierReceiver, Parameterizable, @cil_method
71+
{
7172
/**
7273
* Gets a method implementation, if any. Note that there can
7374
* be several implementations in different assemblies.

csharp/ql/lib/semmle/code/cil/Types.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ class SystemType extends ValueOrRefType {
302302
* ```
303303
*/
304304
class FunctionPointerType extends Type, CustomModifierReceiver, Parameterizable,
305-
@cil_function_pointer_type {
305+
@cil_function_pointer_type
306+
{
306307
/** Gets the return type of this function pointer. */
307308
Type getReturnType() { cil_function_pointer_return_type(this, result) }
308309

csharp/ql/lib/semmle/code/csharp/Property.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ private import TypeRef
1515
* (`Property`), or an indexer (`Indexer`).
1616
*/
1717
class DeclarationWithAccessors extends AssignableMember, Virtualizable, Attributable,
18-
@declaration_with_accessors {
18+
@declaration_with_accessors
19+
{
1920
/** Gets an accessor of this declaration. */
2021
Accessor getAnAccessor() { result.getDeclaration() = this }
2122

@@ -49,7 +50,8 @@ class DeclarationWithAccessors extends AssignableMember, Virtualizable, Attribut
4950
* property (`Property`) or an indexer (`Indexer`).
5051
*/
5152
class DeclarationWithGetSetAccessors extends DeclarationWithAccessors, TopLevelExprParent,
52-
@assignable_with_accessors {
53+
@assignable_with_accessors
54+
{
5355
/** Gets the `get` accessor of this declaration, if any. */
5456
Getter getGetter() { result = this.getAnAccessor() }
5557

csharp/ql/lib/semmle/code/csharp/Variable.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ class LocalScopeVariable extends Variable, @local_scope_variable {
9090
* ```
9191
*/
9292
class Parameter extends DotNet::Parameter, LocalScopeVariable, Attributable, TopLevelExprParent,
93-
@parameter {
93+
@parameter
94+
{
9495
/**
9596
* Gets the position of this parameter. For example, the position of `x` is
9697
* 0 and the position of `y` is 1 in
@@ -376,7 +377,8 @@ class LocalConstant extends LocalVariable, @local_constant {
376377
* ```
377378
*/
378379
class Field extends Variable, AssignableMember, Attributable, TopLevelExprParent, DotNet::Field,
379-
@field {
380+
@field
381+
{
380382
/**
381383
* Gets the initial value of this field, if any. For example, the initial
382384
* value of `F` on line 2 is `20` in

csharp/ql/lib/semmle/code/csharp/commons/Assertions.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ private predicate isDoesNotReturnIfAttributeParameter(Parameter p, boolean value
172172
* A method with a parameter that is annotated with
173173
* `System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(false)`.
174174
*/
175-
class SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertTrueMethod extends BooleanAssertMethod {
175+
class SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertTrueMethod extends BooleanAssertMethod
176+
{
176177
private int i_;
177178

178179
SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertTrueMethod() {
@@ -190,7 +191,8 @@ class SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertTrueMethod exte
190191
* A method with a parameter that is annotated with
191192
* `System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute(true)`.
192193
*/
193-
class SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertFalseMethod extends BooleanAssertMethod {
194+
class SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertFalseMethod extends BooleanAssertMethod
195+
{
194196
private int i_;
195197

196198
SystemDiagnosticsCodeAnalysisDoesNotReturnIfAnnotatedAssertFalseMethod() {

csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ private class RecordConstructorFlow extends SummarizedCallable {
143143

144144
class RequiredSummaryComponentStack = Impl::Public::RequiredSummaryComponentStack;
145145

146-
private class RecordConstructorFlowRequiredSummaryComponentStack extends RequiredSummaryComponentStack {
146+
private class RecordConstructorFlowRequiredSummaryComponentStack extends RequiredSummaryComponentStack
147+
{
147148
override predicate required(SummaryComponent head, SummaryComponentStack tail) {
148149
exists(Property p |
149150
recordConstructorFlow(_, _, p) and

csharp/ql/lib/semmle/code/csharp/dataflow/SSA.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ module Ssa {
110110

111111
/** A plain field or property. */
112112
class PlainFieldOrPropSourceVariable extends FieldOrPropSourceVariable,
113-
SsaImpl::TPlainFieldOrProp {
113+
SsaImpl::TPlainFieldOrProp
114+
{
114115
override Callable getEnclosingCallable() { this = SsaImpl::TPlainFieldOrProp(result, _) }
115116

116117
override string toString() {
@@ -127,7 +128,8 @@ module Ssa {
127128

128129
/** A qualified field or property. */
129130
class QualifiedFieldOrPropSourceVariable extends FieldOrPropSourceVariable,
130-
SsaImpl::TQualifiedFieldOrProp {
131+
SsaImpl::TQualifiedFieldOrProp
132+
{
131133
override Callable getEnclosingCallable() {
132134
this = SsaImpl::TQualifiedFieldOrProp(result, _, _)
133135
}

csharp/ql/lib/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,8 @@ private module ArgumentNodes {
12151215
* ```
12161216
*/
12171217
class ImplicitCapturedArgumentNode extends ArgumentNodeImpl, NodeImpl,
1218-
TImplicitCapturedArgumentNode {
1218+
TImplicitCapturedArgumentNode
1219+
{
12191220
private LocalScopeVariable v;
12201221
private ControlFlow::Nodes::ElementNode cfn;
12211222

@@ -2034,7 +2035,8 @@ private module PostUpdateNodes {
20342035
* a pre-update node for the `ObjectCreationNode`.
20352036
*/
20362037
class ObjectInitializerNode extends PostUpdateNode, NodeImpl, ArgumentNodeImpl,
2037-
TObjectInitializerNode {
2038+
TObjectInitializerNode
2039+
{
20382040
private ObjectCreation oc;
20392041
private ControlFlow::Nodes::ElementNode cfn;
20402042

csharp/ql/lib/semmle/code/csharp/dispatch/Dispatch.qll

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,8 @@ private module Internal {
11151115

11161116
/** A call using reflection. */
11171117
private class DispatchReflectionCall extends DispatchReflectionOrDynamicCall,
1118-
TDispatchReflectionCall {
1118+
TDispatchReflectionCall
1119+
{
11191120
override MethodCall getCall() { this = TDispatchReflectionCall(result, _, _, _, _) }
11201121

11211122
override string getName() { this = TDispatchReflectionCall(_, result, _, _, _) }
@@ -1163,7 +1164,8 @@ private module Internal {
11631164

11641165
/** A method call using dynamic types. */
11651166
private class DispatchDynamicMethodCall extends DispatchReflectionOrDynamicCall,
1166-
TDispatchDynamicMethodCall {
1167+
TDispatchDynamicMethodCall
1168+
{
11671169
override DynamicMethodCall getCall() { this = TDispatchDynamicMethodCall(result) }
11681170

11691171
override string getName() { result = this.getCall().getLateBoundTargetName() }
@@ -1184,7 +1186,8 @@ private module Internal {
11841186

11851187
/** An operator call using dynamic types. */
11861188
private class DispatchDynamicOperatorCall extends DispatchReflectionOrDynamicCall,
1187-
TDispatchDynamicOperatorCall {
1189+
TDispatchDynamicOperatorCall
1190+
{
11881191
override DynamicOperatorCall getCall() { this = TDispatchDynamicOperatorCall(result) }
11891192

11901193
override string getName() {
@@ -1201,7 +1204,8 @@ private module Internal {
12011204

12021205
/** A (potential) call to a property accessor using dynamic types. */
12031206
private class DispatchDynamicMemberAccess extends DispatchReflectionOrDynamicCall,
1204-
TDispatchDynamicMemberAccess {
1207+
TDispatchDynamicMemberAccess
1208+
{
12051209
override DynamicMemberAccess getCall() { this = TDispatchDynamicMemberAccess(result) }
12061210

12071211
override string getName() {
@@ -1225,7 +1229,8 @@ private module Internal {
12251229

12261230
/** A (potential) call to an indexer accessor using dynamic types. */
12271231
private class DispatchDynamicElementAccess extends DispatchReflectionOrDynamicCall,
1228-
TDispatchDynamicElementAccess {
1232+
TDispatchDynamicElementAccess
1233+
{
12291234
override DynamicElementAccess getCall() { this = TDispatchDynamicElementAccess(result) }
12301235

12311236
override string getName() {
@@ -1251,7 +1256,8 @@ private module Internal {
12511256

12521257
/** A (potential) call to an event accessor using dynamic types. */
12531258
private class DispatchDynamicEventAccess extends DispatchReflectionOrDynamicCall,
1254-
TDispatchDynamicEventAccess {
1259+
TDispatchDynamicEventAccess
1260+
{
12551261
override AssignArithmeticOperation getCall() {
12561262
this = TDispatchDynamicEventAccess(result, _, _)
12571263
}
@@ -1268,7 +1274,8 @@ private module Internal {
12681274

12691275
/** A call to a constructor using dynamic types. */
12701276
private class DispatchDynamicObjectCreation extends DispatchReflectionOrDynamicCall,
1271-
TDispatchDynamicObjectCreation {
1277+
TDispatchDynamicObjectCreation
1278+
{
12721279
override DynamicObjectCreation getCall() { this = TDispatchDynamicObjectCreation(result) }
12731280

12741281
override string getName() { none() }

csharp/ql/lib/semmle/code/csharp/exprs/Dynamic.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ class DynamicAccess extends DynamicExpr {
190190
* property, or an event).
191191
*/
192192
class DynamicMemberAccess extends DynamicAccess, MemberAccess, AssignableAccess,
193-
@dynamic_member_access_expr {
193+
@dynamic_member_access_expr
194+
{
194195
override string toString() {
195196
result = "dynamic access to member " + this.getLateBoundTargetName()
196197
}

0 commit comments

Comments
 (0)