-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Include new warning codes in --notrimwarn and --noaotwarn #105049
Conversation
@@ -0,0 +1,41 @@ | |||
using System.Diagnostics.CodeAnalysis; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header?
There was a problem hiding this comment.
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.
@@ -227,9 +229,9 @@ public static class DiagnosticIdExtensions | |||
2103 => MessageSubCategory.TrimAnalysis, | |||
2106 => MessageSubCategory.TrimAnalysis, | |||
2107 => MessageSubCategory.TrimAnalysis, | |||
>= 2109 and <= 2121 => MessageSubCategory.TrimAnalysis, | |||
>= 2109 and <= (int) DiagnosticId._EndTrimAnalysisWarningsSentinel => MessageSubCategory.TrimAnalysis, |
There was a problem hiding this comment.
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 <
@@ -187,6 +187,7 @@ public enum DiagnosticId | |||
_unused_DynamicallyAccessedMembersOnTypeReferencesCompilerGeneratedMemberOnBase = 2120, | |||
RedundantSuppression = 2121, | |||
TypeNameIsNotAssemblyQualified = 2122, | |||
_EndTrimAnalysisWarningsSentinel = 2123, |
There was a problem hiding this comment.
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.
Fixes #105044