Skip to content

Fix S2589 FP: Rule should not raise in case of var pattern where the variable is later used in the same conditional expression #8502

@sagi1623

Description

@sagi1623

Description

Rule should not raise in case of var pattern where the variable is later used in the same conditional expression

Repro steps

https://sonarcloud.io/project/issues?issues=AYon5-dgmw8zdopbp6Ko&open=AYon5-dgmw8zdopbp6Ko&id=sonaranalyzer-dotnet

Expected behavior

No issue should be raised.

Actual behavior

An issue is raised.

Known workarounds

None

Related information

  • C#/VB.NET Plugins version: 9.16

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