mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
C#: Move ExitCode enum out of Extractor class.
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Semmle.Extraction.CSharp.Standalone
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static Extractor.ExitCode Run(Options options)
|
||||
public static ExitCode Run(Options options)
|
||||
{
|
||||
var stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
@@ -64,7 +64,7 @@ namespace Semmle.Extraction.CSharp.Standalone
|
||||
if (sourceFileCount == 0)
|
||||
{
|
||||
logger.Log(Severity.Error, "No source files found");
|
||||
return Extractor.ExitCode.Errors;
|
||||
return ExitCode.Errors;
|
||||
}
|
||||
|
||||
if (!options.SkipExtraction)
|
||||
@@ -81,7 +81,7 @@ namespace Semmle.Extraction.CSharp.Standalone
|
||||
options);
|
||||
logger.Log(Severity.Info, $"Extraction completed in {stopwatch.Elapsed}");
|
||||
}
|
||||
return Extractor.ExitCode.Ok;
|
||||
return ExitCode.Ok;
|
||||
}
|
||||
|
||||
public static int Main(string[] args)
|
||||
|
||||
@@ -16,15 +16,15 @@ using System.Threading;
|
||||
|
||||
namespace Semmle.Extraction.CSharp
|
||||
{
|
||||
public enum ExitCode
|
||||
{
|
||||
Ok, // Everything worked perfectly
|
||||
Errors, // Trap was generated but there were processing errors
|
||||
Failed // Trap could not be generated
|
||||
}
|
||||
|
||||
public static class Extractor
|
||||
{
|
||||
public enum ExitCode
|
||||
{
|
||||
Ok, // Everything worked perfectly
|
||||
Errors, // Trap was generated but there were processing errors
|
||||
Failed // Trap could not be generated
|
||||
}
|
||||
|
||||
private class LogProgressMonitor : IProgressMonitor
|
||||
{
|
||||
private readonly ILogger logger;
|
||||
|
||||
Reference in New Issue
Block a user