-
Notifications
You must be signed in to change notification settings - Fork 466
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
CA1801 is reported for event-handler method #2593
Comments
@mavasani Could the exclusion for |
Yes, this is indeed correct. I don't believe the analyzer should be adjusted to bail out on this UWP specific issue. I believe there are 2 possible ways to address this:
I am going to mark this issue as external/by-design. |
Analyzer package
Microsoft.CodeAnalysis.FxCopAnalyzers
Package Version
v2.9.3
Diagnostic ID
CA1801
Repro steps
Example:
XAML
CS
Expected behavior
CA1801 is not reported as the method is event handler.
Actual behavior
Similar to #2458, CA1801 is being reported. Although the sub type is not EventArgs, the intention is the same and should be ignored. It is also impossible to change RoutedEventArgs to EventArgs to mitigate this issue.
The text was updated successfully, but these errors were encountered: