roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS0036 without GenerateDocumentationFile shows error

Open curcas opened this issue 10 months ago • 3 comments

Having a project without GenerateDocumentationFile property set to true and RCS0036 active shows an error.

Steps to reproduce

  1. Have the GenerateDocumentationFile missing or set to false in the csproj
<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <GenerateDocumentationFile>false</GenerateDocumentationFile>
    </PropertyGroup>
</Project>
  1. Have a class with documentation on the properties
/// <summary>
/// Test
/// </summary>
public class TestClass
{
    /// <summary>
    /// Create instance
    /// </summary>
    public TestClass(string p1, string p2)
    {
        P1 = p1;
        P2 = p2;
    }

    /// <summary>
    /// P1
    /// </summary>
    public string P1 { get; }

    /// <summary>
    /// P2
    /// </summary>
    public string P2 { get; }
}
  1. Build and see the error
error RCS0036: Remove blank line between single-line declarations of same kind

curcas avatar Jan 17 '25 13:01 curcas