Skip to content

Commit d0dfb49

Browse files
committed
Kotlin/Java: Add compilation_info table
1 parent c842677 commit d0dfb49

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

java/ql/lib/config/semmlecode.dbscheme

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ compilation_started(
3131
int id : @compilation ref
3232
)
3333

34+
compilation_info(
35+
int id : @compilation ref,
36+
string info_key: string ref,
37+
string info_value: string ref
38+
)
39+
3440
/**
3541
* The arguments that were passed to the extractor for a compiler
3642
* invocation. If `id` is for the compiler invocation

java/ql/lib/semmle/code/java/Compilation.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,9 @@ class Compilation extends @compilation {
143143
* Holds if the extractor encountered non-recoverable errors.
144144
*/
145145
predicate nonRecoverableErrors() { compilation_finished(this, _, _, 2) }
146+
147+
/**
148+
* Gets the piece of compilation information with the given key, if any.
149+
*/
150+
string getInfo(string key) { compilation_info(this, key, result) }
146151
}

0 commit comments

Comments
 (0)