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

Conflict between RCS0012 and RCS0009 #1471

Closed
DmitrijsIvanovs opened this issue May 23, 2024 · 0 comments · Fixed by #1472
Closed

Conflict between RCS0012 and RCS0009 #1471

DmitrijsIvanovs opened this issue May 23, 2024 · 0 comments · Fixed by #1472
Assignees

Comments

@DmitrijsIvanovs
Copy link

Product and Version Used:
Roslynator.Analyzers v4.12.3
Roslynator.Formatting.Analyzers v4.12.3

Steps to Reproduce:

  1. Create enum with documented values
  2. RCS0012 is raised
  3. remove blank line
  4. RCS0009 is raised
  5. add blank line
  6. back to step 2

Actual Behavior:

/// <summary>
/// Description
/// </summary>
public enum EntityState
{
    /// <summary>
    /// Record is in active use.
    /// </summary>
    Active = 0,
                                                              //RCS0012: Add blank line between single-line declarations raised incorrectly
    /// <summary>
    /// Record is inactive.
    /// </summary>
    Inactive = 1
}

/// <summary>
/// Description
/// </summary>
public enum EntityState2
{
    /// <summary>
    /// Record is in active use.
    /// </summary>
    Active = 0, //RCS0009: Add blank line between declaration and documentation comment raised correctly
    /// <summary>
    /// Record is inactive.
    /// </summary>
    Inactive = 1
}

Expected Behavior:

/// <summary>
/// Description
/// </summary>
public enum EntityState
{
    /// <summary>
    /// Record is in active use.
    /// </summary>
    Active = 0,
                                                              //no errors raised
    /// <summary>
    /// Record is inactive.
    /// </summary>
    Inactive = 1
}
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.

2 participants