Skip to content

Code analyzer that makes problematic equality checks compiler errors #1527

Open
@lkomanetz

Description

@lkomanetz

Is your feature request related to a problem? Please describe.
I really like the idea of having equality checks where a developer goes left == right or left.Equals(right) being more than just a warning to enforce proper equality checks with decimal values.

Describe the solution you'd like
A code analyzer that looks for equality checks where they aren't using any tolerance and treat them as compiler errors.

Describe alternatives you've considered
I've thought about including FxCop and adding a rule for this purpose but with the Roslyn SDK I feel like a custom analyzer would be the way to go.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions