Skip to content

Commit b84b687

Browse files
authored
Merge pull request #17992 from tamasvajk/binlog/no-compilations
C#: Consider the extraction of empty binlog files acceptable
2 parents 0356cdc + da55732 commit b84b687

File tree

1 file changed

+9
-1
lines changed
  • csharp/extractor/Semmle.Extraction.CSharp/Extractor

1 file changed

+9
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,15 @@ static bool filter(CompilerCall compilerCall)
161161
var allCompilationData = reader.ReadAllCompilationData(filter);
162162
var allFailed = true;
163163

164-
logger.LogInfo($" Found {allCompilationData.Count} compilations in binary log");
164+
if (allCompilationData.Count == 0)
165+
{
166+
logger.LogWarning(" No compilations found in binary log.");
167+
return ExitCode.Ok;
168+
}
169+
else
170+
{
171+
logger.LogInfo($" Found {allCompilationData.Count} compilations in binary log");
172+
}
165173

166174
foreach (var compilationData in allCompilationData)
167175
{

0 commit comments

Comments
 (0)