mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Merge Extractor.Standalone and OutputPath
This commit is contained in:
@@ -65,7 +65,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
|
||||
public static Assembly CreateOutputAssembly(Context cx)
|
||||
{
|
||||
if (cx.Extractor.OutputPath == null)
|
||||
if (cx.Extractor.Standalone)
|
||||
throw new InternalError("Attempting to create the output assembly in standalone extraction mode");
|
||||
return AssemblyConstructorFactory.Instance.CreateEntity(cx, outputAssemblyCacheKey, null);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
|
||||
if (attributeSyntax is object)
|
||||
{
|
||||
if (Context.Extractor.OutputPath != null)
|
||||
if (!Context.Extractor.Standalone)
|
||||
{
|
||||
trapFile.attribute_location(this, Assembly.CreateOutputAssembly(Context));
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
{
|
||||
// Some built in operators lack locations, so loc is null.
|
||||
yield return Context.CreateLocation(ReportingLocation);
|
||||
if (Context.Extractor.OutputPath != null && loc.Kind == LocationKind.SourceFile)
|
||||
if (!Context.Extractor.Standalone && loc.Kind == LocationKind.SourceFile)
|
||||
yield return Assembly.CreateOutputAssembly(Context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
foreach (var l in GetLocations(Symbol))
|
||||
yield return Context.CreateLocation(l);
|
||||
|
||||
if (Context.Extractor.OutputPath != null && Symbol.DeclaringSyntaxReferences.Any())
|
||||
if (!Context.Extractor.Standalone && Symbol.DeclaringSyntaxReferences.Any())
|
||||
yield return Assembly.CreateOutputAssembly(Context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user