From da5573203ed5c3ed149a600006c219e856f7938e Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 15 Nov 2024 08:35:21 +0100 Subject: [PATCH] C#: Consider the extraction of empty binlog files acceptable --- .../Semmle.Extraction.CSharp/Extractor/Extractor.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs index a2cfa5669df0..50f673a71581 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs @@ -161,7 +161,15 @@ static bool filter(CompilerCall compilerCall) var allCompilationData = reader.ReadAllCompilationData(filter); var allFailed = true; - logger.LogInfo($" Found {allCompilationData.Count} compilations in binary log"); + if (allCompilationData.Count == 0) + { + logger.LogWarning(" No compilations found in binary log."); + return ExitCode.Ok; + } + else + { + logger.LogInfo($" Found {allCompilationData.Count} compilations in binary log"); + } foreach (var compilationData in allCompilationData) {