C#: Store compilations, compiler diagnostics and performance in the database.

This commit is contained in:
calum
2019-03-21 17:57:27 +00:00
committed by Calum Grant
parent 4cc23cce13
commit e1158bb5e5
17 changed files with 484 additions and 15 deletions

View File

@@ -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;