Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Ignore the ASP.NET Core meta packages"
Browse files Browse the repository at this point in the history
  • Loading branch information
slang25 committed Sep 18, 2018
1 parent ad4e702 commit ccd4f14
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions NuKeeper.Inspection/UpdateFinder.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand All @@ -15,6 +16,10 @@ public class UpdateFinder: IUpdateFinder
private readonly IPackageUpdatesLookup _packageUpdatesLookup;
private readonly INuKeeperLogger _logger;

// ASP.NET Core has well know packages that should either be implicitly versioned, or carefully selected based on installed runtime
private static readonly List<string> _knownIgnoredPackages = new List<string>
{"Microsoft.AspNetCore.App", " Microsoft.AspNetCore.All"};

public UpdateFinder(
IRepositoryScanner repositoryScanner,
IPackageUpdatesLookup packageUpdatesLookup,
Expand All @@ -32,6 +37,7 @@ public async Task<IReadOnlyCollection<PackageUpdateSet>> FindPackageUpdateSets(
{
// scan for nuget packages
var packages = _repositoryScanner.FindAllNuGetPackages(workingFolder)
.Where(x => !_knownIgnoredPackages.Contains(x.Id, StringComparer.OrdinalIgnoreCase))
.ToList();

_logger.Log(PackagesFoundLogger.Log(packages));
Expand Down

0 comments on commit ccd4f14

Please sign in to comment.