Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ dotnet_diagnostic.CA1847.severity = warning
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1858
dotnet_diagnostic.CA1858.severity = warning

# CA1860: Avoid using 'Enumerable.Any()' extension method
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1860
dotnet_diagnostic.CA1860.severity = warning

# CA1868: Unnecessary call to 'Contains' for sets
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1868
dotnet_diagnostic.CA1868.severity = warning
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/MshObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ public virtual PSObject Copy()
bool needToReAddInstanceMembersAndTypeNames = !object.ReferenceEquals(GetKeyForResurrectionTables(this), GetKeyForResurrectionTables(returnValue));
if (needToReAddInstanceMembersAndTypeNames)
{
Diagnostics.Assert(!returnValue.InstanceMembers.Any(), "needToReAddInstanceMembersAndTypeNames should mean that the new object has a fresh/empty list of instance members");
Diagnostics.Assert(returnValue.InstanceMembers.Count == 0, "needToReAddInstanceMembersAndTypeNames should mean that the new object has a fresh/empty list of instance members");
foreach (PSMemberInfo member in this.InstanceMembers)
{
if (member.IsHidden)
Expand Down
Loading