-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return counts from RestoreTask for PackageReference projects #6049
base: dev
Are you sure you want to change the base?
Conversation
@@ -51,6 +51,9 @@ internal class AuditUtility | |||
internal int DistinctAdvisoriesSuppressedCount { get; private set; } | |||
internal int TotalWarningsSuppressedCount { get; private set; } | |||
|
|||
/// <inheritdoc cref="RestoreSummary.AuditRan"/> | |||
internal bool AuditRan { get; private set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just have CheckPackageVulnerabilitiesAsync()
return Task<bool>
and then save the value here to be returned. Just my vote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it's pretty much done that way anyways in the 3 places we return.
@@ -51,6 +51,9 @@ internal class AuditUtility | |||
internal int DistinctAdvisoriesSuppressedCount { get; private set; } | |||
internal int TotalWarningsSuppressedCount { get; private set; } | |||
|
|||
/// <inheritdoc cref="RestoreSummary.AuditRan"/> | |||
internal bool AuditRan { get; private set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it's pretty much done that way anyways in the 3 places we return.
@@ -138,7 +138,8 @@ static bool HasProjectToRestore(DependencyGraphSpec dgSpec, bool restorePackages | |||
|
|||
try | |||
{ | |||
bool result = await BuildTasksUtility.RestoreAsync( | |||
// todo: need to return Restore task output properties, like in NuGet.targets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO's need to be linked to issues.
Sorry I missed this in the first review.
Bug
Fixes: NuGet/Home#13778
Description
Add properties output properties
RestoreProjectCount
,RestoreSkippedCount
, andRestoreProjectsAuditedCount
to RestoreTask (non-static graph version). Static graph version will be implemented later, and including packages.config projects is waiting for customer feedback.The tests demonstrate how to to fail a restore if NuGetAudit was not enabled for at least 1 project.
PR Checklist