Skip to content

Commit 89af50f

Browse files
committed
rename all lower-case import-as statements
1 parent 5458243 commit 89af50f

File tree

10 files changed

+75
-75
lines changed

10 files changed

+75
-75
lines changed

csharp/ql/lib/semmle/code/csharp/frameworks/system/Linq.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
* Provides classes related to the namespace `System.Linq`.
33
*/
44

5-
private import csharp as csharp
5+
private import csharp as CSharp
66
private import semmle.code.csharp.frameworks.System as System
77
private import semmle.code.csharp.dataflow.ExternalFlow as ExternalFlow
88

99
/** Definitions relating to the `System.Linq` namespace. */
1010
module SystemLinq {
1111
/** The `System.Linq` namespace. */
12-
class Namespace extends csharp::Namespace {
12+
class Namespace extends CSharp::Namespace {
1313
Namespace() {
1414
this.getParentNamespace() instanceof System::SystemNamespace and
1515
this.hasUndecoratedName("Linq")
1616
}
1717
}
1818

1919
/** A class in the `System.Linq` namespace. */
20-
class Class extends csharp::Class {
20+
class Class extends CSharp::Class {
2121
Class() { this.getNamespace() instanceof Namespace }
2222
}
2323

@@ -26,10 +26,10 @@ module SystemLinq {
2626
SystemLinqEnumerableClass() { this.hasName("Enumerable") }
2727

2828
/** Gets a `Count()` method. */
29-
csharp::ExtensionMethod getACountMethod() { result = this.getAMethod("Count<>") }
29+
CSharp::ExtensionMethod getACountMethod() { result = this.getAMethod("Count<>") }
3030

3131
/** Gets an `Any()` method. */
32-
csharp::ExtensionMethod getAnAnyMethod() { result = this.getAMethod("Any<>") }
32+
CSharp::ExtensionMethod getAnAnyMethod() { result = this.getAMethod("Any<>") }
3333
}
3434
}
3535

csharp/ql/lib/semmle/code/csharp/frameworks/system/data/Common.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
* Provides classes related to the namespace `System.Data.Common`.
33
*/
44

5-
private import csharp as csharp
5+
private import csharp as CSharp
66
private import semmle.code.csharp.frameworks.system.Data as Data
77
private import semmle.code.csharp.dataflow.ExternalFlow as ExternalFlow
88

99
/** Definitions relating to the `System.Data.Common` namespace. */
1010
module SystemDataCommon {
1111
/** The `System.Data.Common` namespace. */
12-
class Namespace extends csharp::Namespace {
12+
class Namespace extends CSharp::Namespace {
1313
Namespace() {
1414
this.getParentNamespace() instanceof Data::SystemDataNamespace and
1515
this.hasName("Common")
1616
}
1717
}
1818

1919
/** A class in the `System.Data.Common` namespace. */
20-
class Class extends csharp::Class {
20+
class Class extends CSharp::Class {
2121
Class() { this.getNamespace() instanceof Namespace }
2222
}
2323

csharp/ql/lib/semmle/code/csharp/frameworks/system/data/Entity.qll

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
* Provides classes related to the Entity Framework namespace `System.Data.Entity`.
33
*/
44

5-
private import csharp as csharp
5+
private import csharp as CSharp
66
private import semmle.code.csharp.frameworks.system.Data as Data
77

88
/** Definitions relating to the `System.Data.Entity` namespace. */
99
module SystemDataEntity {
1010
/** The `System.Data.Entity` namespace. */
11-
class Namespace extends csharp::Namespace {
11+
class Namespace extends CSharp::Namespace {
1212
Namespace() {
1313
this.getParentNamespace() instanceof Data::SystemDataNamespace and
1414
this.hasName("Entity")
1515
}
1616
}
1717

1818
/** A class in the `System.Data.Entity` namespace. */
19-
class Class extends csharp::Class {
19+
class Class extends CSharp::Class {
2020
Class() { this.getNamespace() instanceof Namespace }
2121
}
2222

@@ -25,28 +25,28 @@ module SystemDataEntity {
2525
Database() { this.hasName("Database") }
2626

2727
/** Gets the `ExecuteSqlCommand` method. */
28-
csharp::Method getExecuteSqlCommandMethod() { result = this.getAMethod("ExecuteSqlCommand") }
28+
CSharp::Method getExecuteSqlCommandMethod() { result = this.getAMethod("ExecuteSqlCommand") }
2929

3030
/** Gets the `ExecuteSqlCommandAsync` method. */
31-
csharp::Method getExecuteSqlCommandAsyncMethod() {
31+
CSharp::Method getExecuteSqlCommandAsyncMethod() {
3232
result = this.getAMethod("ExecuteSqlCommandAsync")
3333
}
3434

3535
/** Gets the `SqlQuery` method. */
36-
csharp::Method getSqlQueryMethod() { result = this.getAMethod("SqlQuery") }
36+
CSharp::Method getSqlQueryMethod() { result = this.getAMethod("SqlQuery") }
3737
}
3838

3939
/** The `System.Data.Entity.DbSet` class. */
4040
class DbSet extends Class {
4141
DbSet() {
42-
this.getUnboundDeclaration().(csharp::UnboundGenericClass).getUndecoratedName() = "DbSet"
42+
this.getUnboundDeclaration().(CSharp::UnboundGenericClass).getUndecoratedName() = "DbSet"
4343
}
4444

4545
/** Gets the `SqlQuery` method. */
46-
csharp::Method getSqlQueryMethod() { result = this.getAMethod("SqlQuery") }
46+
CSharp::Method getSqlQueryMethod() { result = this.getAMethod("SqlQuery") }
4747

4848
/** Gets the `DbSet` type, if any. */
49-
csharp::Type getDbSetType() { result = this.(csharp::ConstructedType).getTypeArgument(0) }
49+
CSharp::Type getDbSetType() { result = this.(CSharp::ConstructedType).getTypeArgument(0) }
5050
}
5151

5252
/** The `System.Data.Entity.DbContext` class. */
@@ -55,23 +55,23 @@ module SystemDataEntity {
5555
}
5656

5757
/** A user provided sub type of `DbContext`. */
58-
class CustomDbContext extends csharp::Class {
58+
class CustomDbContext extends CSharp::Class {
5959
CustomDbContext() {
6060
this.fromSource() and
6161
this.getABaseType+() instanceof DbContext
6262
}
6363

6464
/** Gets a property that has the type `DbSet`. */
65-
csharp::Property getADbSetProperty() {
65+
CSharp::Property getADbSetProperty() {
6666
result = this.getAProperty() and
6767
result.getType() instanceof DbSet
6868
}
6969
}
7070

7171
/** An Entity Framework entity, as referenced from a `CustomDbContext`. */
72-
class Entity extends csharp::Class {
72+
class Entity extends CSharp::Class {
7373
Entity() {
74-
exists(CustomDbContext dbContext, csharp::Property p |
74+
exists(CustomDbContext dbContext, CSharp::Property p |
7575
p = dbContext.getADbSetProperty() and
7676
this = p.getType().(DbSet).getDbSetType()
7777
)
@@ -82,15 +82,15 @@ module SystemDataEntity {
8282
/** Definitions relating to the `System.Data.Entity.Infrastructure` namespace. */
8383
module SystemDataEntityInfrastructure {
8484
/** The `System.Data.Entity.Infrastructure` namespace. */
85-
class Namespace extends csharp::Namespace {
85+
class Namespace extends CSharp::Namespace {
8686
Namespace() {
8787
this.getParentNamespace() instanceof SystemDataEntity::Namespace and
8888
this.hasName("Infrastructure")
8989
}
9090
}
9191

9292
/** A class in the `System.Data.Entity.Infrastructure` namespace. */
93-
class Class extends csharp::Class {
93+
class Class extends CSharp::Class {
9494
Class() { this.getNamespace() instanceof Namespace }
9595
}
9696

@@ -99,7 +99,7 @@ module SystemDataEntityInfrastructure {
9999
DbRawSqlQuery() {
100100
this.getABaseType*()
101101
.getUnboundDeclaration()
102-
.(csharp::UnboundGenericClass)
102+
.(CSharp::UnboundGenericClass)
103103
.getUndecoratedName() = "DbRawSqlQuery"
104104
}
105105
}

csharp/ql/lib/semmle/code/csharp/frameworks/system/linq/Expressions.qll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
* Provides classes related to the namespace `System.Linq.Expressions`.
33
*/
44

5-
private import csharp as csharp
5+
private import csharp as CSharp
66
private import semmle.code.csharp.frameworks.system.Linq
77

88
/** Definitions relating to the `System.Linq.Expressions` namespace. */
99
module SystemLinqExpressions {
1010
/** The `System.Linq.Expressions` namespace. */
11-
class Namespace extends csharp::Namespace {
11+
class Namespace extends CSharp::Namespace {
1212
Namespace() {
1313
this.getParentNamespace() instanceof SystemLinq::Namespace and
1414
this.hasName("Expressions")
1515
}
1616
}
1717

1818
/** A class in the `System.Linq.Expressions` namespace. */
19-
class Class extends csharp::Class {
19+
class Class extends CSharp::Class {
2020
Class() { this.getNamespace() instanceof Namespace }
2121
}
2222

2323
/** The `Expression<TDelegate>` class. */
24-
class ExpressionDelegate extends Class, csharp::UnboundGenericClass {
24+
class ExpressionDelegate extends Class, CSharp::UnboundGenericClass {
2525
ExpressionDelegate() { this.hasName("Expression<>") }
2626
}
2727

@@ -30,20 +30,20 @@ module SystemLinqExpressions {
3030
* or a type of the form `Expression<T>`, where `T` is an actual
3131
* `delegate` type.
3232
*/
33-
class DelegateExtType extends csharp::Type {
34-
csharp::DelegateType dt;
33+
class DelegateExtType extends CSharp::Type {
34+
CSharp::DelegateType dt;
3535

3636
DelegateExtType() {
3737
this = dt
3838
or
3939
this =
40-
any(csharp::ConstructedClass cc |
40+
any(CSharp::ConstructedClass cc |
4141
cc.getUnboundGeneric() instanceof ExpressionDelegate and
4242
dt = cc.getTypeArgument(0)
4343
)
4444
}
4545

4646
/** Gets the underlying `delegate` type. */
47-
csharp::DelegateType getDelegateType() { result = dt }
47+
CSharp::DelegateType getDelegateType() { result = dt }
4848
}
4949
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/** Provides classes related to the namespace `System.Xml.XPath`. */
22

3-
import csharp as csharp
4-
private import semmle.code.csharp.frameworks.system.Xml as xml
3+
import csharp as CSharp
4+
private import semmle.code.csharp.frameworks.system.Xml as Xml
55

66
/** Definitions relating to the `System.Xml.XPath` namespace. */
77
module SystemXmlXPath {
88
/** The `System.Xml.XPath` namespace. */
9-
class Namespace extends csharp::Namespace {
9+
class Namespace extends CSharp::Namespace {
1010
Namespace() {
11-
this.getParentNamespace() instanceof xml::SystemXmlNamespace and
11+
this.getParentNamespace() instanceof Xml::SystemXmlNamespace and
1212
this.hasName("XPath")
1313
}
1414
}
1515

1616
/** A class in the `System.Xml.XPath` namespace. */
17-
class Class extends csharp::Class {
17+
class Class extends CSharp::Class {
1818
Class() { this.getNamespace() instanceof Namespace }
1919
}
2020

@@ -28,17 +28,17 @@ module SystemXmlXPath {
2828
XPathNavigator() { this.hasName("XPathNavigator") }
2929

3030
/** Gets a method that selects nodes. */
31-
csharp::Method getASelectMethod() {
31+
CSharp::Method getASelectMethod() {
3232
result = this.getAMethod() and result.getName().matches("Select%")
3333
}
3434

3535
/** Gets the `Compile` method. */
36-
csharp::Method getCompileMethod() { result = this.getAMethod("Compile") }
36+
CSharp::Method getCompileMethod() { result = this.getAMethod("Compile") }
3737

3838
/** Gets an `Evaluate` method. */
39-
csharp::Method getAnEvaluateMethod() { result = this.getAMethod("Evaluate") }
39+
CSharp::Method getAnEvaluateMethod() { result = this.getAMethod("Evaluate") }
4040

4141
/** Gets a `Matches` method. */
42-
csharp::Method getAMatchesMethod() { result = this.getAMethod("Matches") }
42+
CSharp::Method getAMatchesMethod() { result = this.getAMethod("Matches") }
4343
}
4444
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Configures boosting for adaptive threat modeling (ATM).
55
*/
66

7-
private import javascript as raw
7+
private import javascript as JS
88
import EndpointTypes
99

1010
/**
@@ -37,30 +37,30 @@ abstract class AtmConfig extends string {
3737
*
3838
* Holds if `source` is a known source of flow.
3939
*/
40-
predicate isKnownSource(raw::DataFlow::Node source) { none() }
40+
predicate isKnownSource(JS::DataFlow::Node source) { none() }
4141

4242
/**
4343
* EXPERIMENTAL. This API may change in the future.
4444
*
4545
* Holds if `sink` is a known sink of flow.
4646
*/
47-
predicate isKnownSink(raw::DataFlow::Node sink) { none() }
47+
predicate isKnownSink(JS::DataFlow::Node sink) { none() }
4848

4949
/**
5050
* EXPERIMENTAL. This API may change in the future.
5151
*
5252
* Holds if the candidate source `candidateSource` predicted by the machine learning model should be
5353
* an effective source, i.e. one considered as a possible source of flow in the boosted query.
5454
*/
55-
predicate isEffectiveSource(raw::DataFlow::Node candidateSource) { none() }
55+
predicate isEffectiveSource(JS::DataFlow::Node candidateSource) { none() }
5656

5757
/**
5858
* EXPERIMENTAL. This API may change in the future.
5959
*
6060
* Holds if the candidate sink `candidateSink` predicted by the machine learning model should be
6161
* an effective sink, i.e. one considered as a possible sink of flow in the boosted query.
6262
*/
63-
predicate isEffectiveSink(raw::DataFlow::Node candidateSink) { none() }
63+
predicate isEffectiveSink(JS::DataFlow::Node candidateSink) { none() }
6464

6565
/**
6666
* EXPERIMENTAL. This API may change in the future.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* Provides information about the results of boosted queries for use in adaptive threat modeling (ATM).
55
*/
66

7-
private import javascript as raw
8-
private import raw::DataFlow as DataFlow
7+
private import javascript as JS
8+
private import JS::DataFlow as DataFlow
99
import ATMConfig
1010
private import BaseScoring
1111
private import EndpointScoring as EndpointScoring

0 commit comments

Comments
 (0)