IntrodutionMicrosoft released the tool for source code analysis for C#.Currently MS developed this only for C# not for VB. Microsoft using this for their internal purpose also. They have named this as "StyleCop". Earlier, MS released the tool called "FxCop" that analyse the compiled binaries but "StyleCop" analyse the source code. It provides the set of rules for style, documentation ,readability, etc. Currently they have defined around 200 rules. Those rules are not Customizable.But you switch ON/OFF the rules depending on your needs or company standard.
They have covered the following catagory rules:
1. Documentation 2. Layout 3. Maintainability 4. Naming 5. Ordering 6. Readability 7. Spacing
Screenshot of rules in StyleCop: Screenshot of using this tool in application: ConclusionIn this article, i have explained how to analysis the code using StyleCop with visual studio IDE. |