You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you sure that is violating CA1708? I think, and the documentation seems to confirm, that by default it only looks at "externally visible" members, so it might not be checking that private field. Are you getting a warning for this or did you just notice that it violated the principle?
I'm also pretty sure the analyzers ignore generated code, but maybe I just remember discussing that at some point.
But I do agree that this violates the convention of private fields being prefixed with a _ and should be changed to do that.
Describe the bug
RelayCommand generates code that violates CA1708
but should be:
Regression
No response
Steps to reproduce
Set latest-recommended on project
The error happens on net9 onwards since analysislevel_9_recommended.global has the rule
Expected behavior
Generated code be like suggested in CA1708 description:
Screenshots
No response
IDE and version
Rider
IDE version
No response
Nuget packages
Nuget package version(s)
8.4.0
Additional context
No response
Help us help you
Yes, but only if others can assist
The text was updated successfully, but these errors were encountered: