mirror of
https://github.com/github/codeql.git
synced 2025-12-20 02:44:30 +01:00
C#: Store output assembly in compilation_assembly relation
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
import File
|
||||
private import Attribute
|
||||
private import semmle.code.csharp.commons.Compilation
|
||||
|
||||
/**
|
||||
* A location of a program element.
|
||||
@@ -171,6 +172,9 @@ class Assembly extends Location, Attributable, @assembly {
|
||||
/** Gets the version of this assembly. */
|
||||
Version getVersion() { assemblies(this, _, _, _, result) }
|
||||
|
||||
/** Gets the compilation producing this assembly if any. */
|
||||
Compilation getCompilation() { compilation_assembly(result, this) }
|
||||
|
||||
override File getFile() { assemblies(this, result, _, _, _) }
|
||||
|
||||
override string toString() { result = this.getFullName() }
|
||||
|
||||
@@ -9,6 +9,9 @@ class Compilation extends @compilation {
|
||||
/** Gets the directory in which this compilation was run, as a string. */
|
||||
string getDirectoryString() { compilations(this, result) }
|
||||
|
||||
/** Gets the output assembly. */
|
||||
Assembly getOutputAssembly() { compilation_assembly(this, result) }
|
||||
|
||||
/** Gets the folder in which this compilation was run. */
|
||||
Folder getFolder() { result.getAbsolutePath() = getDirectoryString() }
|
||||
|
||||
|
||||
@@ -151,6 +151,11 @@ compilation_finished(
|
||||
float elapsed_seconds : float ref
|
||||
);
|
||||
|
||||
compilation_assembly(
|
||||
unique int id : @compilation ref,
|
||||
int assembly: @assembly ref
|
||||
)
|
||||
|
||||
/*
|
||||
* External artifacts
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user