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

SA1514 is falsely reported when documenting types declared in the global namespace #3849

Open
Arthri opened this issue May 28, 2024 · 1 comment · May be fixed by #3863
Open

SA1514 is falsely reported when documenting types declared in the global namespace #3849

Arthri opened this issue May 28, 2024 · 1 comment · May be fixed by #3863

Comments

@Arthri
Copy link

Arthri commented May 28, 2024

/// <summary>
/// X.
/// </summary>
public class K
{
}

SA1514: Element documentation header should be preceded by blank line is reported on the first /// in the file. Adding the new line resolves the diagnostic but instead raises SA1517: Code should not contain blank lines at start of file, leading to an infinite loop. Furthermore, the class has been intentionally declared in the global namespace, so there is no space for a namespace declaration

@bjornhellander
Copy link
Contributor

I can confirm this using 1.2.0-beta.556, regardless of how bad practice it might be :-)
SA1514 does however not go away for me, when adding a newline before.

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