Code Analysis in VS 2008
Team System October 27th, 2007
VS 2005 introduced internal static analysis tools. This helps you to write secure and quality code.
Visual Studio 2008 has new Code Analysis features:
- Code Metrics – This gives you the ability to dig deep to find those un-maintainable and complex hotspots. Code Metrics will ship with five metrics – Cyclomatic Complexity, Depth of Inheritance, Class Coupling, Lines of Code and Maintainability Index.
- Analysis improvements:
- Support for analyzing anonymous methods and lambda expressions
- Reduced noise in existing analysis and the ability to skip over tool generated code
- New analysis, including additional rules around security, globalization, maintainability and spelling.
To generate code metrics, simply do the following:In Solution Explorer, right-click on your solution/project and choose Generate Code Metrics
After generation you’ll get the Code Metrics Results window and a tooltip on every column that explain the result. The Maintainability Index column includes a maintainability indicator light that changes based on the maintainability of the code. Green indicates good maintainability, yellow indicates moderate maintainability, and red indicates poor maintainability.
Similar Posts:
- Microsoft Source Analysis for C#
- Rosario Preview #3 – Developer Edition
- VSTSDB 2008 GDR CTP16
- VSTSDB 2008 GDR CTP16
- NDepend – Great Static Analyzer
Tags: Code Analysis, Coding Standards, Visual Studio 2008, Visual Studio Team System


About


This comment originally written by:
VS 2005 introduced internal static analysis tools. This helps you to write secure and quality code. Visual Studio 2008 has new Code Analysis features: Code Metrics – This gives you the ability to dig deep to find those un-maintainable and complex hotspots
This comment originally written by:Duane Fields
For those who don't have the Team System, Exact Magic Software has a free add in to Visual Studio called "Studio Tools" that has Code Metrics built in as well. It's pretty much the same thing as the one in the Team Edition. You can download it from http://www.exactmagic.com
This comment originally written by:savitha
Want Details about the Code analysis and Code metric