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 public and internal generated members #7479

Conversation

dvoituron
Copy link
Contributor

[ResxSourceGenerator] Add a /// <summary /> comment to public and internal generated members

See #7478

Analyzer

Microsoft.CodeAnalysis.ResxSourceGenerator

Describe the improvement

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

Example:
{67B60FCB-FE48-4164-B0BB-A8C5EFB6546F}

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).

<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>

Unit Tests

All unit tests are updated to include these new <summary /> comments.

@dvoituron dvoituron requested a review from a team as a code owner November 25, 2024 13:52
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.50%. Comparing base (5435ba7) to head (3b41f40).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7479   +/-   ##
=======================================
  Coverage   96.50%   96.50%           
=======================================
  Files        1450     1450           
  Lines      347319   347325    +6     
  Branches    11409    11409           
=======================================
+ Hits       335184   335192    +8     
+ Misses       9244     9243    -1     
+ Partials     2891     2890    -1     

@uo1
Copy link

uo1 commented Nov 26, 2024

Duplicate to pull request #7366

@sharwell
Copy link
Member

Duplicate of #7366

@sharwell sharwell marked this as a duplicate of #7366 Nov 27, 2024
@sharwell sharwell closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants