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

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

Open
dvoituron opened this issue Nov 23, 2024 · 0 comments · May be fixed by #7366

Comments

@dvoituron
Copy link
Contributor

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant