dotnet / roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.

Home Page:https://josefpihrt.github.io/docs/roslynator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflict between RCS0012 and RCS0009

DmitrijsIvanovs opened this issue · comments

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
}