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

False Positive in RCS0005 (Add blank line before #endregion) when #endregion follows #endif / #error / #line / #nullable / #warning, plus a blank line #1626

Open
Bergam64 opened this issue Feb 11, 2025 · 0 comments

Comments

@Bergam64
Copy link

Product and Version Used:
VS extension Roslynator 2022 v4.12.11

Steps to Reproduce:

  • (Example with #endif. The issue is the same with #error, #line, #nullable or #warning)
  • Enable RCS0005 in your .editorconfig file (disabled by default).
  • Open a C# file and follow example below.

Actual Behavior:

    #region R

#if false
    // ...
#endif

    #endregion // <-- RCS0005 is wrongly reported here, even though there's a blank line above!

Expected Behavior:

    #region R

#if false
    // ...
#endif

    #endregion // <-- No RCS0005 reported here.

Note: similar to issue 1528.

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

2 participants