Improve logging, expose inherited feeds in integration test

This commit is contained in:
Tamas Vajk
2024-04-10 12:02:33 +02:00
parent 8d0856f97e
commit 743e77d0d4
3 changed files with 5 additions and 3 deletions

View File

@@ -522,7 +522,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
{
logger.LogInfo("Checking Nuget feeds...");
var (explicitFeeds, allFeeds) = GetAllFeeds(allFiles);
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
var excludedFeeds = EnvironmentVariables.GetURLs(EnvironmentVariableNames.ExcludedNugetFeedsFromResponsivenessCheck)
.ToHashSet() ?? [];
@@ -549,9 +548,11 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
}
CompilationInfos.Add(("All Nuget feeds reachable", allFeedsReachable ? "1" : "0"));
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
if (inheritedFeeds.Count > 0)
{
logger.LogInfo($"Inherited Nuget feeds: {string.Join(", ", inheritedFeeds.OrderBy(f => f))}");
logger.LogInfo($"Inherited Nuget feeds (not checked for reachability): {string.Join(", ", inheritedFeeds.OrderBy(f => f))}");
CompilationInfos.Add(("Inherited Nuget feed count", inheritedFeeds.Count.ToString()));
}