Skip to content

Commit

Permalink
Suppress CA1307 warning for string.GetHashCode() method (#3404)
Browse files Browse the repository at this point in the history
  • Loading branch information
kartheekp-ms authored and heng-liu committed May 20, 2020
1 parent 5a95cde commit cfe8d60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/NuGet.Core/NuGet.Commands/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,4 @@
[assembly: SuppressMessage("Build", "CA2237:Add [Serializable] to RestoreSpecException as this type implements ISerializable", Justification = "<Pending>", Scope = "type", Target = "~T:NuGet.Commands.RestoreSpecException")]
[assembly: SuppressMessage("Build", "CA2237:Add [Serializable] to SignCommandException as this type implements ISerializable", Justification = "<Pending>", Scope = "type", Target = "~T:NuGet.Commands.SignCommandException")]
[assembly: SuppressMessage("Build", "CA1052:Type 'UpdateSourceRunner' is a static holder type but is neither static nor NotInheritable", Justification = "<Pending>", Scope = "type", Target = "~T:NuGet.Commands.UpdateSourceRunner")]
[assembly: SuppressMessage("Build", "CA1307:The behavior of 'string.GetHashCode()' could vary based on the current user's locale settings. Replace this call in 'Microsoft.Extensions.Internal.HashCodeCombiner.Add(string)' with a call to 'string.GetHashCode(System.StringComparison)'.", Justification = "<Pending>", Scope = "member", Target = "~M:Microsoft.Extensions.Internal.HashCodeCombiner.Add(System.String)")]
3 changes: 3 additions & 0 deletions src/NuGet.Core/NuGet.Packaging/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,6 @@
[assembly: SuppressMessage("Build", "CA1012:Abstract type VerificationAllowListEntry should not have constructors", Justification = "<Pending>", Scope = "type", Target = "~T:NuGet.Packaging.Signing.VerificationAllowListEntry")]
[assembly: SuppressMessage("Build", "CA1067:Type NuGet.RuntimeModel.RuntimeGraph.RuntimeCompatKey should override Equals because it implements IEquatable<T>", Justification = "<Pending>", Scope = "type", Target = "~T:NuGet.RuntimeModel.RuntimeGraph.RuntimeCompatKey")]
[assembly: SuppressMessage("Build", "CA1067:Type NuGet.RuntimeModel.RuntimeGraph.RuntimeDependencyKey should override Equals because it implements IEquatable<T>", Justification = "<Pending>", Scope = "type", Target = "~T:NuGet.RuntimeModel.RuntimeGraph.RuntimeDependencyKey")]
[assembly: SuppressMessage("Build", "CA1307:The behavior of 'string.GetHashCode()' could vary based on the current user's locale settings. Replace this call in 'NuGet.ContentModel.ContentItemCollection.GroupComparer.GetHashCode(NuGet.ContentModel.ContentItem)' with a call to 'string.GetHashCode(System.StringComparison)'.", Justification = "<Pending>", Scope = "member", Target = "~M:NuGet.ContentModel.ContentItemCollection.GroupComparer.GetHashCode(NuGet.ContentModel.ContentItem)~System.Int32")]
[assembly: SuppressMessage("Build", "CA1307:The behavior of 'string.GetHashCode()' could vary based on the current user's locale settings. Replace this call in 'NuGet.Packaging.FrameworkSpecificGroup.GetHashCode()' with a call to 'string.GetHashCode(System.StringComparison)'.", Justification = "<Pending>", Scope = "member", Target = "~M:NuGet.Packaging.FrameworkSpecificGroup.GetHashCode~System.Int32")]
[assembly: SuppressMessage("Build", "CA1307:The behavior of 'string.GetHashCode()' could vary based on the current user's locale settings. Replace this call in 'NuGet.Packaging.PhysicalPackageFile.GetHashCode()' with a call to 'string.GetHashCode(System.StringComparison)'.", Justification = "<Pending>", Scope = "member", Target = "~M:NuGet.Packaging.PhysicalPackageFile.GetHashCode~System.Int32")]

0 comments on commit cfe8d60

Please sign in to comment.