Can't find settings for "naming rule" in Resharper!

2.2k views Asked by At

I got tired of Reshaper complaining on any variables I have named as "varID" to change to Camel Case (i.e. "varId").

So I tried to add a rule in Resharper under

Edit 'Local Variables' Rule Settings

And set the "Name Suffix" with a "ID" and it stopped complaining. Now, if I have a variable as "varID" it will complain and recommend it be renamed to "var". But when I inspect/edit the rules, my original rule is no longer there.

NOTE: I didn't edit the existing rule in case you suggest I check that.

Anyone have any ideas?

2

There are 2 answers

1
Brandon On BEST ANSWER

I would undo the Name Suffix change. Then go to

Resharper -> Options -> Naming Style (under Languages/Common) and click Advanced Settings.

In the abbreviations list at the bottom is where you want to add ID. Then it should stop complaining about ID being used in variable names, properties, etc.

4
mathijsuitmegen On

If you want to disable 'naming rules':

  • Go to 'Reshaper -> Options -> Code Inspection - > Inspection Severity.
  • Use the search box to search for 'inconsistent naming'.
  • Change the value of the drop-down list to 'Do not show'.