Skip to content

ResxSourceGenerator: Add a /// <summary /> comment to all public generated members (classes and methods). #7478

Open
@dvoituron

Description

Analyzer

Microsoft.CodeAnalysis.ResxSourceGenerator

Analyzer source

NuGet Package: Microsoft.CodeAnalysis.ResxSourceGenerator
Version: - 3.11.0-beta1.24508.2

Describe the improvement

Add a /// <summary /> comment to all public generated members (classes and methods).

Describe suggestions on how to achieve the rule

I use this csproj configuration containing the <Public> flag to generate a public class.
My editorconfig rules require all public classes/methods to contain XML documentation.
So I get the following error “CS1592 Missing XML comment for publicly visible type or member ‘LanguageResource’”.
I can't add an exclusion to this file because it's not generated in my source folders (but in a temporary folder).

Is it possible to add // <summary /> to the class name and ResourceManager method?
Can I create a PR to do this?

<ItemGroup>
  <PackageReference Include="Microsoft.CodeAnalysis.ResxSourceGenerator">
    <PrivateAssets>all</PrivateAssets>
    <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
  </PackageReference>
    
  <EmbeddedResource Update="Localization\LanguageResource.resx">
    <Public>true</Public>
    <OmitGetResourceString>true</OmitGetResourceString>
    <AsConstants>true</AsConstants>
  </EmbeddedResource>
</ItemGroup>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions