Skip to content

Commit 8d97fe9

Browse files
committed
JavaScript: Autoformat
1 parent 21d5fa8 commit 8d97fe9

File tree

65 files changed

+320
-172
lines changed

Some content is hidden

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

65 files changed

+320
-172
lines changed

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointCharacteristics.qll

Lines changed: 80 additions & 40 deletions
Large diffs are not rendered by default.

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointFeatures.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ class FileImports extends EndpointFeature, TFileImports {
204204
* will be treated by tokenization as if they were spaces.
205205
*/
206206
class ContextSurroundingFunctionParameters extends EndpointFeature,
207-
TContextSurroundingFunctionParameters {
207+
TContextSurroundingFunctionParameters
208+
{
208209
override string getName() { result = "contextSurroundingFunctionParameters" }
209210

210211
Function getRelevantFunction(DataFlow::Node endpoint) {

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointTypes.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ class TaintedPathSinkType extends EndpointType, TTaintedPathSinkType {
6464

6565
/** The `ShellCommandInjectionFromEnvironmentSink` class that can be predicted by endpoint scoring models. */
6666
class ShellCommandInjectionFromEnvironmentSinkType extends EndpointType,
67-
TShellCommandInjectionFromEnvironmentSinkType {
67+
TShellCommandInjectionFromEnvironmentSinkType
68+
{
6869
override string getDescription() { result = "ShellCommandInjectionFromEnvironmentSink" }
6970

7071
override int getEncoding() { result = 5 }

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/TaintedPathATM.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ class TaintedPathAtmConfig extends AtmConfig {
5151
* of barrier guards, we port the barrier guards for the boosted query from the standard library to
5252
* sanitizer guards here.
5353
*/
54-
private class BarrierGuardNodeAsSanitizerGuardNode extends TaintTracking::LabeledSanitizerGuardNode instanceof TaintedPath::BarrierGuardNode {
54+
private class BarrierGuardNodeAsSanitizerGuardNode extends TaintTracking::LabeledSanitizerGuardNode instanceof TaintedPath::BarrierGuardNode
55+
{
5556
override predicate sanitizes(boolean outcome, Expr e) {
5657
blocks(outcome, e) or blocks(outcome, e, _)
5758
}

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/XssATM.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class DomBasedXssAtmConfig extends AtmConfig {
4040
private import semmle.javascript.security.dataflow.Xss::Shared as Shared
4141

4242
private class PrefixStringSanitizerActivated extends TaintTracking::SanitizerGuardNode,
43-
DomBasedXss::PrefixStringSanitizer {
43+
DomBasedXss::PrefixStringSanitizer
44+
{
4445
PrefixStringSanitizerActivated() { this = this }
4546
}
4647

@@ -52,6 +53,7 @@ private class QuoteGuard extends TaintTracking::SanitizerGuardNode, Shared::Quot
5253
QuoteGuard() { this = this }
5354
}
5455

55-
private class ContainsHtmlGuard extends TaintTracking::SanitizerGuardNode, Shared::ContainsHtmlGuard {
56+
private class ContainsHtmlGuard extends TaintTracking::SanitizerGuardNode, Shared::ContainsHtmlGuard
57+
{
5658
ContainsHtmlGuard() { this = this }
5759
}

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/XssThroughDomATM.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ class TypeTestGuard extends TaintTracking::SanitizerGuardNode, DataFlow::ValueNo
7171
private import semmle.javascript.security.dataflow.Xss::Shared as Shared
7272

7373
private class PrefixStringSanitizer extends TaintTracking::SanitizerGuardNode,
74-
DomBasedXss::PrefixStringSanitizer {
74+
DomBasedXss::PrefixStringSanitizer
75+
{
7576
PrefixStringSanitizer() { this = this }
7677
}
7778

@@ -83,6 +84,7 @@ private class QuoteGuard extends TaintTracking::SanitizerGuardNode, Shared::Quot
8384
QuoteGuard() { this = this }
8485
}
8586

86-
private class ContainsHtmlGuard extends TaintTracking::SanitizerGuardNode, Shared::ContainsHtmlGuard {
87+
private class ContainsHtmlGuard extends TaintTracking::SanitizerGuardNode, Shared::ContainsHtmlGuard
88+
{
8789
ContainsHtmlGuard() { this = this }
8890
}

javascript/ql/experimental/adaptivethreatmodeling/modelbuilding/extraction/Queries.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class XssThroughDomQuery extends Query, TXssThroughDomQuery {
3939
}
4040

4141
class ShellCommandInjectionFromEnvironmentQuery extends Query,
42-
TShellCommandInjectionFromEnvironmentQuery {
42+
TShellCommandInjectionFromEnvironmentQuery
43+
{
4344
override string getName() { result = "ShellCommandInjectionFromEnvironment" }
4445
}

javascript/ql/lib/semmle/javascript/Closure.qll

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ module Closure {
4848
* A call to a method on the `goog.` namespace, as a closure reference.
4949
*/
5050
abstract private class DefaultNamespaceRef extends DataFlow::MethodCallNode,
51-
ClosureNamespaceRef::Range {
51+
ClosureNamespaceRef::Range
52+
{
5253
DefaultNamespaceRef() { this = DataFlow::globalVarRef("goog").getAMethodCall() }
5354

5455
override string getClosureNamespace() { result = getArgument(0).getStringValue() }
@@ -75,21 +76,22 @@ module Closure {
7576
/**
7677
* A top-level call to `goog.provide`.
7778
*/
78-
class ClosureProvideCall extends ClosureNamespaceRef, DataFlow::MethodCallNode instanceof DefaultClosureProvideCall {
79-
}
79+
class ClosureProvideCall extends ClosureNamespaceRef, DataFlow::MethodCallNode instanceof DefaultClosureProvideCall
80+
{ }
8081

8182
/**
8283
* A call to `goog.require`.
8384
*/
84-
private class DefaultClosureRequireCall extends DefaultNamespaceRef, ClosureNamespaceAccess::Range {
85+
private class DefaultClosureRequireCall extends DefaultNamespaceRef, ClosureNamespaceAccess::Range
86+
{
8587
DefaultClosureRequireCall() { getMethodName() = "require" }
8688
}
8789

8890
/**
8991
* A call to `goog.require`.
9092
*/
91-
class ClosureRequireCall extends ClosureNamespaceAccess, DataFlow::MethodCallNode instanceof DefaultClosureRequireCall {
92-
}
93+
class ClosureRequireCall extends ClosureNamespaceAccess, DataFlow::MethodCallNode instanceof DefaultClosureRequireCall
94+
{ }
9395

9496
/**
9597
* A top-level call to `goog.module` or `goog.declareModuleId`.
@@ -104,8 +106,8 @@ module Closure {
104106
/**
105107
* A top-level call to `goog.module` or `goog.declareModuleId`.
106108
*/
107-
class ClosureModuleDeclaration extends ClosureNamespaceRef, DataFlow::MethodCallNode instanceof DefaultClosureModuleDeclaration {
108-
}
109+
class ClosureModuleDeclaration extends ClosureNamespaceRef, DataFlow::MethodCallNode instanceof DefaultClosureModuleDeclaration
110+
{ }
109111

110112
private GlobalVariable googVariable() { variables(result, "goog", any(GlobalScope sc)) }
111113

javascript/ql/lib/semmle/javascript/Concepts.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ module Cryptography {
124124
* Extend this class to refine existing API models. If you want to model new APIs,
125125
* extend `CryptographicOperation::Range` instead.
126126
*/
127-
class CryptographicOperation extends SC::CryptographicOperation instanceof CryptographicOperation::Range {
127+
class CryptographicOperation extends SC::CryptographicOperation instanceof CryptographicOperation::Range
128+
{
128129
/**
129130
* DEPRECATED. This predicate has been renamed to `getAnInput`.
130131
*

javascript/ql/lib/semmle/javascript/DOM.qll

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ module DOM {
6363
/**
6464
* An HTML element, viewed as an `ElementDefinition`.
6565
*/
66-
private class HtmlElementDefinition extends ElementDefinition, @xmlelement instanceof HTML::Element {
66+
private class HtmlElementDefinition extends ElementDefinition, @xmlelement instanceof HTML::Element
67+
{
6768
override string getName() { result = HTML::Element.super.getName() }
6869

6970
override AttributeDefinition getAttribute(int i) {
@@ -127,7 +128,8 @@ module DOM {
127128
/**
128129
* An HTML attribute, viewed as an `AttributeDefinition`.
129130
*/
130-
private class HtmlAttributeDefinition extends AttributeDefinition, @xmlattribute instanceof HTML::Attribute {
131+
private class HtmlAttributeDefinition extends AttributeDefinition, @xmlattribute instanceof HTML::Attribute
132+
{
131133
override string getName() { result = HTML::Attribute.super.getName() }
132134

133135
override string getStringValue() { result = super.getValue() }
@@ -138,7 +140,8 @@ module DOM {
138140
/**
139141
* A JSX attribute, viewed as an `AttributeDefinition`.
140142
*/
141-
private class JsxAttributeDefinition extends AttributeDefinition, @jsx_attribute instanceof JsxAttribute {
143+
private class JsxAttributeDefinition extends AttributeDefinition, @jsx_attribute instanceof JsxAttribute
144+
{
142145
override string getName() { result = JsxAttribute.super.getName() }
143146

144147
override DataFlow::Node getValueNode() {

0 commit comments

Comments
 (0)