-
Notifications
You must be signed in to change notification settings - Fork 227
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
Update S3962: Ignore public static readonly fields #607
Comments
Thanks for reporting @williamdiesny. That's a good suggestion. |
I made a pull-request, hope this help... |
IMHO S3962 should also ignore internal visibility fields if the containing assembly is using |
@MaxTranced we thought about that when we developed the fix, but it is rather difficult to check for assembly attributes from an analyzer that works on class level. It could be done, but in exchange for significant complexity increase... |
@valhristov that makes sense. Thank you! |
Description
The solution proposed by the rules S3962 and S2339 are not compatible.
Rule S3962 : Change static readonly into const,
Rule S2339 : Change public constant into static readonly.
I think the rule S3962 should be applied only on non public constant.
The text was updated successfully, but these errors were encountered: