Remove m prefix from private fields

Answered

I have a code base with private fields that have a m prefix (so it follows the mUpperCamelCase format) and I'd like to remove the m prefix and have every private field in my project to follow the lowerCamelCase format.

Unfortunately, setting the CodeStyle naming rule for private fields to lowerCamelCase doesn't make Rider recognize my fields as wrongly formatted since mUpperCamelCase actually follows the lowerCamelCase format. For example, mGameState follows both the mUpperCamelCase and the lowerCamelCase format.

I would really like to avoid going through every field in my project and renaming them one by one and use the built in Rider feature for this. Is there any way to force Rider to not recognize mUpperCamelCase as lowerCamelCase? Like somehow recognizing that a field only has 'm' as the first word of its lowerCamelCase format and rename it accordingly?

1
2 comments

Fred,

Unfortunately, Rider cannot distinguish mUpperCamelCase from lowerCamelCase. Sorry :(

0

Apparently, there is a feature request for your case. Please feel free to upvote: https://youtrack.jetbrains.com/issue/RSRP-474170

0

Please sign in to leave a comment.