Static Code Analysis (aka FxCop) – Simple Code Analysis

SKU: Premium, Ultimate Versions: 2008, 2010 Code: vstipTool0139   In my extensive travels with my good friend Clint Edmonson (http://www.notsotrivial.net/blog/) we found yet another feature available in Visual that seems to be underutilized: Static Code Analysis. After some digging, we discovered many people don’t realize they have this feature already and can use it anytime…

4

Code Metrics: Working with Columns

Windows: Alt, V, M (press several times), Enter Menu: View | Other Windows | Code Metrics Results Command: View.CodeMetricsResults SKU: Premium, Ultimate Versions: 2008, 2010 Languages: C++ (managed only), C#, VB Code: vstipTool0138     The last top on our tour of the Code Metrics Results window is how to work with columns. Sadly the…

0

Code Metrics – Creating Work Items from Code Metrics Results

Windows: Alt, V, M (press several times), Enter Menu: View | Other Windows | Code Metrics Results Command: View.CodeMetricsResults SKU: Premium, Ultimate Versions: 2008, 2010 Languages: C++ (managed only), C#, VB Code: vstipTool0137   NOTE: This tip requires that you are connected to a Team Foundation Server (TFS) for source control. You can learn more…

0

Code Metrics: Code Metrics Results Exporting

Windows: Alt, V, M (press several times), Enter Menu: View | Other Windows | Code Metrics Results Command: View.CodeMetricsResults SKU: Premium, Ultimate Versions: 2008, 2010 Languages: C++ (managed only), C#, VB Code: vstipTool0136   Previously I showed you how to filter your code metrics results. Now let’s look at how to export your results to…

0

Code Metrics – Code Metrics Results Filtering

Windows: Alt, V, M (press several times), Enter Menu: View | Other Windows | Code Metrics Results Command: View.CodeMetricsResults SKU: Premium, Ultimate Versions: 2008, 2010 Languages: C++ (managed only), C#, VB Code: vstipTool0135   Having explored code metrics in great detail in the previous posts (see the article on Cyclomatic Complexity that started the series…

0

Code Metrics – Maintainability Index

SKU: Premium, Ultimate Versions: 2008, 2010 Code: vstipTool0134   At long last it is time to look at the final metric from the code metrics (see vstipTool0129, “Code Metrics – Calculating Metrics”): maintainability index. As with the other metrics it is best to start with some definitions. First, from the MSDN main documentation: “[Maintainability Index…

0

Code Metrics – Class Coupling

SKU: Premium, Ultimate Versions: 2008, 2010 Code: vstipTool0133     As we continue looking at code metrics in Visual Studio (see vstipTool0129, “Calculating Metrics”), it’s time to look at class coupling. Class coupling also goes by the name Coupling Between Objects (CBO) as originally defined by [CK94]. Basically, class coupling is a measure of how…

4

Code Metrics – Depth of Inheritance (DIT)

SKU: Premium, Ultimate Versions: 2008, 2010 Code: vstipTool0132   Continuing our examination of code metrics (see vstipTool0129, “Calculating Metrics”), it’s time to take a look at one of the metrics designed specifically for object-oriented analysis: Depth of Inheritance. Depth of inheritance, also called depth of inheritance tree (DIT), is defined as “the maximum length from…

0

Code Metrics – Cyclomatic Complexity

SKU: Premium, Ultimate Versions: 2008, 2010 Code: vstipTool0131   When working with code metrics, one of the least understood items seems to be cyclomatic complexity. Essentially, with cyclomatic complexity, higher numbers are “bad” and lower numbers are “good”. We use cyclomatic complexity to get a sense of how hard any given code may be to…

13