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) and SA1506 (A documentation header must not be followed by a blank line) require wrong spacing #1132

Closed
oatkins opened this issue Aug 6, 2015 · 1 comment
Assignees
Milestone

Comments

@oatkins
Copy link
Contributor

oatkins commented Aug 6, 2015

In legacy StyleCop, the following is correct:

/// <summary>Some summary.</summary>
// Some comment.
public void A()
{
}

Introducing a space between the two comment lines would cause a violation of SA1506.

In this project, the above code gives SA1515. Introducing a space between the two comment lines, which is wrong by legacy StyleCop, removes the analyzer warning.

See also #1130 and #1131.

Incidentally, I don't really like this style, but I have many violations because of the new analyzer behaviour. The primary reason is that we have many comments like

/// <summary>Doc comments here...</summary>
// ReSharper disable once XXXX
public void SomeMethodWithReSharperSuppression()
{
}

where the spacing has been chosen to avoid SC violations. It's a pain that these now give analyzer warnings.

@Noryoko
Copy link
Contributor

Noryoko commented Aug 8, 2015

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