Enable IDE0041: UseIsNullCheck (#14041)
https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0041
This commit is contained in:
parent
006fe4d2dd
commit
a0e9d7b040
|
@ -848,7 +848,7 @@ dotnet_diagnostic.IDE0039.severity = silent
|
|||
dotnet_diagnostic.IDE0040.severity = warning
|
||||
|
||||
# IDE0041: UseIsNullCheck
|
||||
dotnet_diagnostic.IDE0041.severity = silent
|
||||
dotnet_diagnostic.IDE0041.severity = warning
|
||||
|
||||
# IDE0042: UseDeconstruction
|
||||
dotnet_diagnostic.IDE0042.severity = silent
|
||||
|
|
|
@ -1971,7 +1971,7 @@ namespace System.Management.Automation
|
|||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj))
|
||||
if (obj is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -859,7 +859,7 @@ namespace System.Management.Automation
|
|||
/// </summary>
|
||||
public int CompareTo(SemanticVersion value)
|
||||
{
|
||||
if ((object)value == null)
|
||||
if (value is null)
|
||||
return 1;
|
||||
|
||||
if (Major != value.Major)
|
||||
|
|
Loading…
Reference in a new issue