dotnet/roslyn-analyzers

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

Opened this issue · 0 comments

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>