简体   繁体   中英

How to customize naming convention for c# project

I have a project where I have to follow a specific type of naming convention for private and public members.

I was using VS static code analysis and was very happy with it.

My project has many class library projects and Now I have to do the following : Run a scan on all libraries and see if specific naming convention is followed or not.

ie I have declared : int _itemID;

it should be reported invalid naming convention correct should be " int iItemId; or int intItemId;

How can make a tool to identify such declarations?

Perhaps you should try Resharper ?

ReSharper can reformat an arbitrary selected block of code, all code in the current file, all files in a directory, or even in the entire project or solution, according to your Code Style preferences. ReSharper provides distinct formatting options for C#, VB.NET, JavaScript, CSS and XML code. Reformatting affects braces layout, blank lines, line wrapping and line breaks, spaces in various contexts, indentation, aligning multiple constructs, and a lot more options that you can fine-tune in the ReSharper Options dialog box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM