Recognise NU1801 in addition to NU1301

This commit is contained in:
Michael B. Gale
2026-02-28 20:01:57 +00:00
parent 9a9f88a7f2
commit 1b6c0c7d8e

View File

@@ -27,7 +27,8 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
private readonly Lazy<IEnumerable<string>> restoredProjects = new(() => GetFirstGroupOnMatch(RestoredProjectRegex(), Output));
public IEnumerable<string> RestoredProjects => Success ? restoredProjects.Value : Array.Empty<string>();
private readonly Lazy<bool> hasNugetPackageSourceError = new(() => Output.Any(s => s.Contains("NU1301")));
// NU1301 is the error and NU1801 is the equivalent warning.
private readonly Lazy<bool> hasNugetPackageSourceError = new(() => Output.Any(s => s.Contains("NU1301") || s.Contains("NU1801")));
public bool HasNugetPackageSourceError => hasNugetPackageSourceError.Value;
private readonly Lazy<bool> hasNugetNoStablePackageVersionError = new(() => Output.Any(s => s.Contains("NU1103")));