Skip to content

Commit 5b2be8c

Browse files
committed
Fix code review findings
1 parent 026bcc7 commit 5b2be8c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

csharp/ql/src/Stubs/Stubs.qll

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import csharp
1515
private import semmle.code.csharp.frameworks.System
16-
private import semmle.code.dotnet.DotNet as DotNet
1716

1817
/** An element that should be in the generated code. */
1918
abstract class GeneratedElement extends Element { }
@@ -22,8 +21,8 @@ abstract class GeneratedElement extends Element { }
2221
abstract class GeneratedMember extends Member, GeneratedElement { }
2322

2423
/** Class representing all `struct`s, such as user defined ones and built-in ones, like `int`. */
25-
private class StructEx extends Type {
26-
StructEx() {
24+
private class StructExt extends Type {
25+
StructExt() {
2726
this instanceof Struct or
2827
this instanceof SimpleType or
2928
this instanceof VoidType or
@@ -39,7 +38,7 @@ abstract private class GeneratedType extends Type, GeneratedElement {
3938
or
4039
this instanceof Class
4140
or
42-
this instanceof StructEx
41+
this instanceof StructExt
4342
or
4443
this instanceof Enum
4544
or
@@ -88,7 +87,7 @@ abstract private class GeneratedType extends Type, GeneratedElement {
8887
private string stubKeyword() {
8988
this instanceof Interface and result = "interface"
9089
or
91-
this instanceof StructEx and result = "struct"
90+
this instanceof StructExt and result = "struct"
9291
or
9392
this instanceof Class and result = "class"
9493
or
@@ -333,7 +332,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement {
333332
}
334333

335334
private predicate isInAssembly(Assembly assembly) {
336-
any(GeneratedType gt | gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this)
335+
any(GeneratedType gt | gt.(ValueOrRefType).getDeclaringNamespace() = this)
337336
.isInAssembly(assembly)
338337
or
339338
this.getChildNamespace(_).isInAssembly(assembly)
@@ -354,7 +353,7 @@ private class GeneratedNamespace extends Namespace, GeneratedElement {
354353
this.isInAssembly(assembly) and
355354
result =
356355
concat(GeneratedType gt |
357-
gt.(DotNet::ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly)
356+
gt.(ValueOrRefType).getDeclaringNamespace() = this and gt.isInAssembly(assembly)
358357
|
359358
gt.getStub(assembly) order by gt.getName()
360359
)
@@ -794,7 +793,7 @@ private string stubConstructor(Constructor c, Assembly assembly) {
794793
then result = ""
795794
else
796795
if
797-
not c.getDeclaringType() instanceof StructEx or
796+
not c.getDeclaringType() instanceof StructExt or
798797
c.getNumberOfParameters() > 0
799798
then
800799
result =

0 commit comments

Comments
 (0)