Naming Rule / ALL_UPPER


Hello,

we have a little problem with the naming rule setting ALL_UPPER in R#:

When we write a constant variable like this:

internal const string B2MML_SUBLOT_PREFIX = "H";


R# suggests to rename this variable to

internal const string B2_MML_SUBLOT_PREFIX = "H";


The problem here is that we would like to have that all constants are written ALL_UPPER, but also with numbers. So for us,

internal const string B2MML_SUBLOT_PREFIX = "H";


would be correct since all letters are ALL_UPPER. Is there a way to define that numbers are also accepted within the ALL_UPPER?

Kind regards

2 comments
Comment actions Permalink

Hi James,

It can be achieved via Advanced Naming Styles. I've attached image with settings for a reference.

Please note, that the B2 prefix is hardcoded in this naming style; if it's not possible to use it in your scenarios, I'm afraid there is no other way to configure it in ReSharper at the moment.

Please let me know if it helps.
Thanks!



Attachment(s):
screen430.png
0
Comment actions Permalink

Hello,

yes - your information helped; but we solved it a bit different. It seems that this works as well.

I've attached a screenshot.

Thank you for your help!



Attachment(s):
Screenshot.png
0

Please sign in to leave a comment.