We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d34e748 commit 40bb19eCopy full SHA for 40bb19e
java/ql/src/Stubs/MinimalStubsFromSource.ql
@@ -0,0 +1,27 @@
1
+/**
2
+ * Tool to generate C# stubs from a qltest snapshot.
3
+ *
4
+ * It finds all declarations used in the source code,
5
+ * and generates minimal C# stubs containing those declarations
6
+ * and their dependencies.
7
+ */
8
+
9
+import java
10
+import Stubs
11
12
+/** Declarations used by source code. */
13
+class UsedInSource extends GeneratedDeclaration {
14
+ UsedInSource() {
15
+ (
16
+ this = any(Variable v | v.fromSource()).getType()
17
+ or
18
+ this = any(Expr e | e.getEnclosingCallable().fromSource()).getType()
19
20
+ this = any(RefType t | t.fromSource())
21
+ )
22
+ }
23
+}
24
25
+from GeneratedTopLevel t
26
+where not t.fromSource()
27
+select t.getQualifiedName(), t.stubFile()
0 commit comments