Skip to content

BUG: CC0052 - ReadonlyFieldAnalyzer duplicates preprocessor directive #903

@nishant95

Description

@nishant95

Bug

The code-fix of CC0052 (ReadonlyFieldAnalyzer) duplicates the #region

Before:

public class Foo
{
    #region region

    Foo foo = new Foo();

    #endregion
}

Current output after code-fix applied:

public class Foo
{
    #region region

    readonly
    #region region

    Foo foo = new Foo();

    #endregion
}

Expected output after fix applied:

public class Foo
{
    #region region

    readonly Foo foo = new Foo();

    #endregion
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions