Skip to content

Commit d7a93a5

Browse files
committed
Move default excluded assembly definition
1 parent f597c9a commit d7a93a5

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

csharp/ql/src/Stubs/AllStubsFromReference.ql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ class AllExternalPublicDeclarations extends GeneratedDeclaration {
1010
AllExternalPublicDeclarations() { this.fromLibrary() }
1111
}
1212

13-
/** All framework assemblies. */
14-
class NonTargetAssembly extends ExcludedAssembly {
15-
NonTargetAssembly() { this.getFile().getAbsolutePath().matches("%Microsoft.NETCore.App.Ref%") }
16-
}
17-
1813
from Assembly a
1914
select a.getFullName(), a.getName(), a.getVersion().toString(), a.getFile().getAbsolutePath(),
2015
generatedCode(a)

csharp/ql/src/Stubs/AllStubsFromSource.ql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,13 @@ class AllDeclarations extends GeneratedDeclaration {
1010
AllDeclarations() { not this.fromLibrary() }
1111
}
1212

13+
/** Exclude types from these standard assemblies. */
14+
private class DefaultLibs extends ExcludedAssembly {
15+
DefaultLibs() {
16+
this.getName() = "System.Private.CoreLib" or
17+
this.getName() = "mscorlib" or
18+
this.getName() = "System.Runtime"
19+
}
20+
}
21+
1322
select concat(generatedCode(_) + "\n\n")

csharp/ql/src/Stubs/MinimalStubsFromSource.ql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,13 @@ class UsedInSource extends GeneratedDeclaration {
2929
}
3030
}
3131

32+
/** Exclude types from these standard assemblies. */
33+
private class DefaultLibs extends ExcludedAssembly {
34+
DefaultLibs() {
35+
this.getName() = "System.Private.CoreLib" or
36+
this.getName() = "mscorlib" or
37+
this.getName() = "System.Runtime"
38+
}
39+
}
40+
3241
select concat(generatedCode(_) + "\n\n")

csharp/ql/src/Stubs/Stubs.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,6 @@ private class GeneratedNamespace extends Namespace, GeneratedElement {
345345
*/
346346
abstract class ExcludedAssembly extends Assembly { }
347347

348-
/** Exclude types from these standard assemblies. */
349-
private class DefaultLibs extends ExcludedAssembly {
350-
DefaultLibs() {
351-
this.getName() = "System.Private.CoreLib" or
352-
this.getName() = "mscorlib" or
353-
this.getName() = "System.Runtime"
354-
}
355-
}
356-
357348
private Virtualizable getAccessibilityDeclaringVirtualizable(Virtualizable v) {
358349
if not v.isOverride()
359350
then result = v

0 commit comments

Comments
 (0)