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

SA1515 (Single-line comment must be preceded by blank line) should not be reported for single line comment directly following a case or default statement #878

Closed
vweijsters opened this issue May 25, 2015 · 3 comments · Fixed by #879
Assignees
Milestone

Comments

@vweijsters
Copy link
Contributor

The following code will produce SA1515, but should not:

switch (someValue)
{
    case 1:
        // This should not produce SA1515
        return;
    default:
        break;
}
@sharwell
Copy link
Member

This was a big factor in disabling the rule for now (I meant to create an issue for it but ran out of time). Thanks for updating it so quickly. 😄

@AArnott
Copy link
Contributor

AArnott commented Jun 23, 2017

Can we re-open this? It still repros with StyleCop.Analyzers 1.0.0

@sharwell
Copy link
Member

sharwell commented Jun 23, 2017

@AArnott I believe that would be a separate issue. We have a unit test in place saying that this issue is still behaving correctly.

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.

3 participants