Skip to content

CA1305 producing false positives #6745

@javiercn

Description

@javiercn

Analyzer

Diagnostic ID: CA1305: Do not use ReferenceEquals with value types

Analyzer source

SDK: Built-in CA analyzers in .NET 5 SDK or later

Version: SDK 5.0.100

OR

NuGet Package: Microsoft.CodeAnalysis.NetAnalyzers

Version: 5.0.3 (Latest)

Describe the bug

The analyzer seems to be producing false positives.
Image

Steps To Reproduce

Expected behavior

Does not produce false positives.

Actual behavior

The rule produces some false positives.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions