Reputation: 2769
So at my new place I my Resharper options files to accommodate the way things work here but I have a slight problem. They love to name things like _personBC. It's everywhere, I can't change and nor do I want to start telling people to change it, it doesn't hurt anything and it's fine except I can't seem to define a rule to deal with it.
I would like to say, "all provate fields need to at start with underscore / lower case" but when I go to "Resharper -> Options -> "Advanced Setting" and try to add a rule there doesn't seem to be a way to say "^_[a-z]*" or something like that - anyone know how I might be able to do this?
Thanks!
Upvotes: 3
Views: 683
Reputation: 17739
Are you using Resharper 7?
You can press Alt-Enter and add the abbreviation (for example BC or AD) to the abbreviation list:
This irritates me too but alas I don't believe (as of Resharper 7) you can change the settings to be tolerant of adjacent uppercase letters. The default setting for private fields are:
So lots of options but not the one you're looking for!
The only option I see is turning off the inspection options (or show as hint only) so it doesnt distract you.
Upvotes: 6