Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SA1500 is not triggered on init accessors #3667

Closed
bjornhellander opened this issue Jun 17, 2023 · 0 comments · Fixed by #3670
Closed

SA1500 is not triggered on init accessors #3667

bjornhellander opened this issue Jun 17, 2023 · 0 comments · Fixed by #3670

Comments

@bjornhellander
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants