codeformatter
codeformatter copied to clipboard
"m_" fields should be renamed regardless of visibility
Some code bases use the "m_" prefix for internal fields. These should be renamed as with private fields.
indeed they should. However, it might cause a breaking change. You would have to ensure that the code still compiles after changing something. I'd recommend to produce a warning rather than an automatic change.
I'm not sure this is a good idea assuming that we have InternalsVisibleTo.
Assuming that the reformatting happens at a solution-wide scale, the InternalsVisibleToAttribute shouldn't be a problem. But that is not guaranteed.
Reformatting of public and internal names is always a problem. When Reflection is involved, even renaming of private objects might cause problems.
I think it would be a good idea to implement such a feature. By default it should only cause a warning, and when enabled it should reformat. So an opt-in approach rather than an opt-out.