mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Apply suggestions from code review
Co-authored-by: Michael Nebel <michaelnebel@github.com>
This commit is contained in:
@@ -97,7 +97,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
// The value of the environment variable should be a JSON array of objects, such as:
|
||||
// [ { "type": "nuget_feed", "url": "https://nuget.pkg.github.com/org/index.json" } ]
|
||||
var array = JsonConvert.DeserializeObject<List<RegistryConfig>>(registryURLs);
|
||||
if (array != null)
|
||||
if (array is not null)
|
||||
{
|
||||
foreach (RegistryConfig config in array)
|
||||
{
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
// `nuget.config` files instead of the command-line arguments.
|
||||
HashSet<string>? sources = null;
|
||||
|
||||
if (this.dependabotProxy != null)
|
||||
if (this.dependabotProxy is not null)
|
||||
{
|
||||
// If the Dependabot proxy is configured, then our main goal is to make `dotnet` aware
|
||||
// of the private registry feeds. However, since providing them as command-line arguments
|
||||
@@ -275,7 +275,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
// we have discovered from analysing `nuget.config` files.
|
||||
sources = configuredSources ?? new();
|
||||
sources.Add(PublicNugetOrgFeed);
|
||||
this.dependabotProxy?.RegistryURLs.ForEach(url => sources.Add(url));
|
||||
this.dependabotProxy.RegistryURLs.ForEach(url => sources.Add(url));
|
||||
}
|
||||
|
||||
var successCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user