Skip to content

Commit

Permalink
Duplicate NuGetAuditSuppress warnings use code NU1508
Browse files Browse the repository at this point in the history
  • Loading branch information
zivkan committed Jul 16, 2024
1 parent 38ab39a commit ed458cf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<CheckForDuplicateNuGetItemsTask
Items="@(NuGetAuditSuppress)"
ItemName="NuGetAuditSuppress"
LogCode="NU1505"
LogCode="NU1508"
MSBuildProjectFullPath="$(MSBuildProjectFullPath)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
WarningsAsErrors="$(WarningsAsErrors)"
Expand Down
5 changes: 5 additions & 0 deletions src/NuGet.Core/NuGet.Common/Errors/NuGetLogCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ public enum NuGetLogCode
/// </summary>
NU1507 = 1507,

/// <summary>
/// Duplicate NuGetAuditSuppress found
/// </summary>
NU1508 = 1508,

/// <summary>
/// Dependency bumped up
/// </summary>
Expand Down
3 changes: 2 additions & 1 deletion src/NuGet.Core/NuGet.Common/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
NuGet.Common.NuGetLogCode.NU1302 = 1302 -> NuGet.Common.NuGetLogCode
NuGet.Common.HashAlgorithmName.SHA1 = 4 -> NuGet.Common.HashAlgorithmName
NuGet.Common.NuGetLogCode.NU3043 = 3043 -> NuGet.Common.NuGetLogCode
NuGet.Common.NuGetLogCode.NU1905 = 1905 -> NuGet.Common.NuGetLogCode
NuGet.Common.NuGetLogCode.NU1905 = 1905 -> NuGet.Common.NuGetLogCode
NuGet.Common.NuGetLogCode.NU1508 = 1508 -> NuGet.Common.NuGetLogCode
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,7 @@ await SimpleTestPackageUtility.CreateFolderFeedV3Async(
[Theory]
[InlineData("PackageReference", "NU1504")]
[InlineData("PackageDownload", "NU1505")]
[InlineData("NuGetAuditSuppress", "NU1508")]
public async Task DotnetRestore_WithDuplicateItem_WarnsWithLogCode(string itemName, string logCode)
{
using (SimpleTestPathContext pathContext = _dotnetFixture.CreateSimpleTestPathContext())
Expand Down

0 comments on commit ed458cf

Please sign in to comment.