最近微软发布了一款代码分析工具,和微软内部使用的FxCop有些不同,目的大致一样,其工具的规则覆盖到:
Layout of elements, statements, expressions, and query clauses
Placement of curly brackets, parenthesis, square brackets, etc
Spacing around keywords and operator symbols
Line spacing
Placement of method parameters within method declarations or method calls
Standard ordering of elements within a class
Formatting of documentation within element headers and file headers
Naming of elements, fields and variables
Use of the built-in types
Use of access modifiers
Allowed contents of files
Debugging text
大家可以在这里看到具体介绍。