mirror of
https://github.com/github/codeql.git
synced 2026-04-19 05:54:00 +02:00
C#: Inline some calls.
This commit is contained in:
@@ -623,13 +623,9 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
|
||||
private (HashSet<string> explicitFeeds, HashSet<string> allFeeds) GetAllFeeds()
|
||||
{
|
||||
IList<string> GetNugetFeeds(string nugetConfig) => dotnet.GetNugetFeeds(nugetConfig);
|
||||
|
||||
IList<string> GetNugetFeedsFromFolder(string folderPath) => dotnet.GetNugetFeedsFromFolder(folderPath);
|
||||
|
||||
var nugetConfigs = fileProvider.NugetConfigs;
|
||||
var explicitFeeds = nugetConfigs
|
||||
.SelectMany(config => GetFeeds(() => GetNugetFeeds(config)))
|
||||
.SelectMany(config => GetFeeds(() => dotnet.GetNugetFeeds(config)))
|
||||
.ToHashSet();
|
||||
|
||||
if (explicitFeeds.Count > 0)
|
||||
@@ -657,7 +653,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
return null;
|
||||
})
|
||||
.Where(folder => folder != null)
|
||||
.SelectMany(folder => GetFeeds(() => GetNugetFeedsFromFolder(folder!)))
|
||||
.SelectMany(folder => GetFeeds(() => dotnet.GetNugetFeedsFromFolder(folder!)))
|
||||
.ToHashSet();
|
||||
|
||||
logger.LogInfo($"Found {allFeeds.Count} Nuget feeds (with inherited ones) in nuget.config files: {string.Join(", ", allFeeds.OrderBy(f => f))}");
|
||||
|
||||
Reference in New Issue
Block a user