Skip to content

Commit 743e77d

Browse files
committed
Improve logging, expose inherited feeds in integration test
1 parent 8d0856f commit 743e77d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.Nuget.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ private bool CheckFeeds(List<FileInfo> allFiles)
522522
{
523523
logger.LogInfo("Checking Nuget feeds...");
524524
var (explicitFeeds, allFeeds) = GetAllFeeds(allFiles);
525-
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
526525

527526
var excludedFeeds = EnvironmentVariables.GetURLs(EnvironmentVariableNames.ExcludedNugetFeedsFromResponsivenessCheck)
528527
.ToHashSet() ?? [];
@@ -549,9 +548,11 @@ private bool CheckFeeds(List<FileInfo> allFiles)
549548
}
550549
CompilationInfos.Add(("All Nuget feeds reachable", allFeedsReachable ? "1" : "0"));
551550

551+
552+
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
552553
if (inheritedFeeds.Count > 0)
553554
{
554-
logger.LogInfo($"Inherited Nuget feeds: {string.Join(", ", inheritedFeeds.OrderBy(f => f))}");
555+
logger.LogInfo($"Inherited Nuget feeds (not checked for reachability): {string.Join(", ", inheritedFeeds.OrderBy(f => f))}");
555556
CompilationInfos.Add(("Inherited Nuget feed count", inheritedFeeds.Count.ToString()));
556557
}
557558

csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
| All Nuget feeds reachable | 0.0 |
22
| Fallback nuget restore | 1.0 |
3+
| Inherited Nuget feed count | 1.0 |
34
| Project files on filesystem | 1.0 |
45
| Resolved assembly conflicts | 7.0 |
56
| Restored .NET framework variants | 0.0 |

csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_config_error_timeout/proj/nuget.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<clear />
4+
<!-- <clear /> -->
55
<add key="x" value="https://localhost:53/packages/" />
66
<add key="y" value="https://localhost:80/packages/" />
77
</packageSources>

0 commit comments

Comments
 (0)