mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
C#: Store compilations, compiler diagnostics and performance in the database.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Semmle.Util;
|
||||
using Semmle.Util.Logging;
|
||||
|
||||
@@ -82,6 +83,15 @@ namespace Semmle.Extraction
|
||||
/// The extractor SHA, obtained from the git log.
|
||||
/// </summary>
|
||||
string Version { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new context.
|
||||
/// </summary>
|
||||
/// <param name="c">The C# compilation.</param>
|
||||
/// <param name="trapWriter">The trap writer.</param>
|
||||
/// <param name="scope">The extraction scope (what to include in this trap file).</param>
|
||||
/// <returns></returns>
|
||||
Context CreateContext(Compilation c, TrapWriter trapWriter, IExtractionScope scope);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -191,6 +201,11 @@ namespace Semmle.Extraction
|
||||
missingNamespaces.Add(fqdn);
|
||||
}
|
||||
|
||||
public Context CreateContext(Compilation c, TrapWriter trapWriter, IExtractionScope scope)
|
||||
{
|
||||
return new Context(this, c, trapWriter, scope);
|
||||
}
|
||||
|
||||
public IEnumerable<string> MissingTypes => missingTypes;
|
||||
|
||||
public IEnumerable<string> MissingNamespaces => missingNamespaces;
|
||||
|
||||
Reference in New Issue
Block a user