Skip to content

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Jul 17, 2024

Fixes #105044

@sbomer sbomer requested a review from marek-safar as a code owner July 17, 2024 20:53
@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 17, 2024
@@ -0,0 +1,41 @@
using System.Diagnostics.CodeAnalysis;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started from a copy of an existing test that didn't have a copyright header. A lot of our tests don't - I guess that should be fixed.

2106 => MessageSubCategory.TrimAnalysis,
2107 => MessageSubCategory.TrimAnalysis,
>= 2109 and <= 2121 => MessageSubCategory.TrimAnalysis,
>= 2109 and <= (int) DiagnosticId._EndTrimAnalysisWarningsSentinel => MessageSubCategory.TrimAnalysis,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this should be just <

_unused_DynamicallyAccessedMembersOnTypeReferencesCompilerGeneratedMemberOnBase = 2120,
RedundantSuppression = 2121,
TypeNameIsNotAssemblyQualified = 2122,
_EndTrimAnalysisWarningsSentinel = 2123,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to not specify the value - AFAIK C# should assign the next (+1) value automatically which would make this work nicely when we add a new one.

sbomer added a commit that referenced this pull request Jul 19, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trimmer reports IL2122 even if trim warnings are suppressed

3 participants