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

RCS0036 without GenerateDocumentationFile shows error #1608

Open
curcas opened this issue Jan 17, 2025 · 1 comment
Open

RCS0036 without GenerateDocumentationFile shows error #1608

curcas opened this issue Jan 17, 2025 · 1 comment

Comments

@curcas
Copy link

curcas commented Jan 17, 2025

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
@josefpihrt
Copy link
Collaborator

@curcas I was not able to reproduce this bug. Afaik RCS0036 has nothing to do with GenerateDocumentationFile.

Where exactly in your code sample is the diagnostic reported?

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