C#: Adjust trap location, database ID and archiving of generated sources

This commit is contained in:
Tamas Vajk
2024-06-17 13:59:35 +02:00
parent dcd84f47a4
commit fb0520c74a
8 changed files with 124 additions and 42 deletions

View File

@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Microsoft.CodeAnalysis.CSharp;
using Semmle.Util;
using Semmle.Util.Logging;
@@ -11,10 +12,15 @@ namespace Semmle.Extraction.CSharp
{
}
public void Initialize(string cwd, string[] args, string outputPath, CSharpCompilation compilationIn, CommonOptions options)
public void Initialize(
string cwd, string[] args, string outputPath, CSharpCompilation compilation,
IEnumerable<Microsoft.CodeAnalysis.SyntaxTree> generatedSyntaxTrees,
string compilationIdentifier, CommonOptions options)
{
compilation = compilationIn;
ExtractionContext = new ExtractionContext(cwd, args, outputPath, [], Logger, PathTransformer, ExtractorMode.BinaryLog, options.QlTest);
base.compilation = compilation;
ExtractionContext = new BinaryLogExtractionContext(
cwd, args, outputPath, generatedSyntaxTrees, compilationIdentifier,
Logger, PathTransformer, options.QlTest);
this.options = options;
LogExtractorInfo();
SetReferencePaths();