-
Notifications
You must be signed in to change notification settings - Fork 694
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
Duplicate NuGetAuditSuppress warnings use code NU1508 #5921
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -359,7 +359,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |
<CheckForDuplicateNuGetItemsTask | ||
Items="@(NuGetAuditSuppress)" | ||
ItemName="NuGetAuditSuppress" | ||
LogCode="NU1505" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nkolev92 from NuGet/Home#13620
Why do we use a different code for each MSBuild item type? The docs are the same for each item type, since the resolution is the same. I feel like all this design decision does is cause us extra busy work. I feel like one error code, where in the docs we mention that this can happen for multiple item types, would just be easier, with no downside. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The owner of the action isn't always the same. For example, if you search with NU1505, you end up with dotnet/sdk#24747. It's duplicative sure, but I think there's an eventual limit to the number of items we'll be using :) |
||
LogCode="NU1508" | ||
MSBuildProjectFullPath="$(MSBuildProjectFullPath)" | ||
TreatWarningsAsErrors="$(TreatWarningsAsErrors)" | ||
WarningsAsErrors="$(WarningsAsErrors)" | ||
|
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.
@nkolev92 why does NuGet.exe disable duplicate checking?
NuGet.Client/src/NuGet.Clients/NuGet.CommandLine/MsBuildUtility.cs
Line 265 in 128a506
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.
Because TreatWarningsAsErrors would fail the dg spec generation and fail the operation with a message that's not very actionable.
It wasn't worth the effort back then.
Spec has more details: https://github.com/NuGet/Home/blob/dev/accepted/2022/duplicate-nuget-item-error-handling.md#technical-explanation.