开发者

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

I got tired of Reshaper complaining on any variabl开发者_开发技巧es 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?


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.


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'.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜