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

SA1513 reported when I wouldn't expect it #1583

Closed
bjbr-dev opened this issue Oct 1, 2015 · 2 comments
Closed

SA1513 reported when I wouldn't expect it #1583

bjbr-dev opened this issue Oct 1, 2015 · 2 comments
Assignees
Milestone

Comments

@bjbr-dev
Copy link

bjbr-dev commented Oct 1, 2015

I'm getting a violation of SA1513 (ClosingCurlyBracketMustBeFollowedByBlankLine) reported when I'm not expecting it. It's possible it's what you guys expect, but on the off chance it's a bug I thought I'd report it :)

var target = isIFrame
    ? new Dictionary<string, string>
        {
            { "target", "_parent" }
        } // <-- SA1513 Violation reported here
    : new Dictionary<string, string>();

Note: The following code is not raising the issue, but personally I think it's an unnecessary new line that isn't helping readability.

var target = isIFrame
    ? new Dictionary<string, string>
        {
            { "target", "_parent" }
        }

    : new Dictionary<string, string>();

What do you think?

@sharwell
Copy link
Member

sharwell commented Oct 1, 2015

I wouldn't expect SA1513 here. I think the readability of the sample code could be improved, but the problem isn't due to a missing newline after the }.

Marked 🐛 up for grabs. 😄

@vweijsters
Copy link
Contributor

Grabbing this

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

No branches or pull requests

3 participants