Enable IDE0041: UseIsNullCheck (#14041)

https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0041
This commit is contained in:
xtqqczze 2020-11-16 14:57:48 +00:00 committed by GitHub
parent 006fe4d2dd
commit a0e9d7b040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -1971,7 +1971,7 @@ namespace System.Management.Automation
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj))
if (obj is null)
{
return false;
}

View file

@ -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)