mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Disregard _._ dependencies and only default to use an entire framework in case the compile section is empty.
This commit is contained in:
@@ -100,16 +100,18 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
return;
|
||||
}
|
||||
|
||||
// If this is a .NET framework reference then include everything.
|
||||
if (FrameworkPackageNames.AllFrameworks.Any(framework => name.StartsWith(framework)))
|
||||
if (info.Compile is null || !info.Compile.Any())
|
||||
{
|
||||
dependencies.AddFramework(name);
|
||||
}
|
||||
else
|
||||
{
|
||||
info.Compile?
|
||||
.ForEach(r => dependencies.Add(name, r.Key));
|
||||
// If this is a framework reference then include everything.
|
||||
if (FrameworkPackageNames.AllFrameworks.Any(framework => name.StartsWith(framework)))
|
||||
{
|
||||
dependencies.AddFramework(name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
info.Compile
|
||||
.ForEach(r => dependencies.Add(name, r.Key));
|
||||
});
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user