Skip to content

Analyzer for Should().Equals()? #94

@bordecal

Description

@bordecal

Use of actual.Should().Equals(expected) (which is not an assertion at all) is perhaps the single most serious recurrent error I tend to see with FluentAssertions use. Would an analyzer to detect this construct fit with the goals for this project?

N.B.: To be honest, the fact that there isn't already an analyzer for this (or apparently even an existing issue requesting its addition) strikes me as sufficiently odd that I'm wondering if I'm missing some other mechanism that would detect this problem. If such a beastie does exist, an analyzer would presumably be unnecessary, but a documentation update to increase its visibility might be helpful...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions