Skip to content

Remove unreachable code #21

@ElemarJR

Description

@ElemarJR

This:

void Foo()
{
    return;
    var a = 1; //unreachable
}

Will have the var line declaration marked as WellKnownDiagnosticTags.Unnecessary.
And will become:

void Foo()
{
    return;
}

Should work for any possible unreachable code, like statements after throw, else that will never be reached, etc.

Category: Usage
Diagnostic id: CC0055
Severity: Info

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions