Skip to content

SA1500 is not triggered on init accessors #3667

@bjornhellander

Description

@bjornhellander
class MyClass
{
    public int X
    {
        get
        { return 0; } // SA1500

        set
        { } // SA1500
    }

    public int Y
    {
        get
        { return 0; } // SA1500

        init
        { } // No SA1500!
    }
}

I expect SA1500 (Braces for multi line statements must not share line) to trigger on all accessors in the code above, but it is not triggered on the init accessor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions