Hello,
I use the tool JustCode and this tool gives me arround 5700 warnings about naming-recommondations and such inconsitancies. If you look closer in to the warnings you have to come to the conclusion that there isn't any naming-convention in place. In fact the naming is all over the place. So here I propose some Codingconventions.
By the way: JustCode (
http://www.telerik.com/products/justcode.aspx) is a neat "little" tool to enforce StyleRules and such things and also provides project specific settings-files.
3rd party libarries:They should be left alone untouched! Where possible use NuGet-Packages. If there aren't any usable NuGet-Packages create a custom NuGet-like package feed.
http://www.myget.org/ proviedes such services for free usable for open source projects. (I read a blog-post reacently which also spoke about reducing VisualStudio projects by using NuGet-Packages.)
Directories - Files - Namespaces - Types:- One file has only one type. A type can reside in different files (partial keyword) provided the parts of the type is appropiatly and logicaly grouped to the different files.
- The filename (without the extension) is the name of the type.
- The directory-path is the same as the namespace.
Tabs and Intends:- Tabsize = 4 (I personally use here 2 -> condenses the code a lttle)
- Intentionsize = 4 (I personally use here 2 -> condenses the code a lttle)
- Insert spaces
File Header Text:Currently none in use. We could do a general puruose FileHeader Text with some Copyright-Informations in every file.
General:Indentation:Spacing:New Lines:Blank Lines:Ordering:Brace Positions:Wrapping:Using Directives:Here we can define which Using should be in every file and wich shouldn't be deleted if they aren't used in this file.
In every file: none
Don't remove: System, System.Linq
Naming Conventions:Possible naming conventions: camelCase, camel_Underscore, PascalCase, Pascal_Underscore, Sentence_Underscore, lower_underscore, UPER_UNDERSCORE, disabled
There can also be added secondary rules.
Allowed Accronyms are strings that are excluded from naming conventions
Migration Path:Because a rampaging codecleanup would be nearly impossible to review this should only be done in some smaller cleanups. Private and in one file/type contained changes had to be done on sight. Changes which spread in more Types and files with public properties/fields should always reside in one clean commit with a limited number of changes. Every change have to be tested. All commits in this regard have to compile properly on there own!