|
|
|
|
|
Activity:
Perform Code Analysis (CMMI Level 3 : VER 2.1 )
|
|
Participating Roles
Responsible:
Developer |
Code analysis is the process of checking native or .NET managed code against development guidelines. Code analysis for managed code analyzes managed assemblies and reports information about the assemblies, such as violations of the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines. Assemblies are inspected for more than 200 defects in naming conventions, library design, localization, security, and performance. The goal of code analysis for new code bases is to have no code analysis violations or warnings. The goal of code analysis for existing code bases is to have code analysis violations or warnings below the accepted baseline.
Entry Criteria
- Source code for the development task.
- Applicable rules.
- Code analysis guidelines.
Sub-Activities
|
1 |
Analyze New Code |
- If the new code is managed code, run Code Analysis for Managed Code to identify rule violations and warnings. If the existing code is native code, run Code Analysis for C/C++ to identify rule violations and warnings.
- Fix any rule violations or warnings, then build, and run unit tests. If any changes break a unit test, debug and fix the code so the unit test runs successfully.
- Fix one rule violation or warning at a time. Repeat until all of the rules are checked or all warnings are gone.
|
2 |
Analyze Existing Code |
- For existing code bases with a large number of warnings, consult the code analysis guidelines for a baseline of rules and warnings established for existing code. The baseline may indicate a category of rules or warnings that is to be eliminated. If automation is used, determine the number of warnings in the existing code base.
- If the existing code is managed code, run Code Analysis for Managed Code to identify rule violations and warnings. If the existing code is native code, run Code Analysis for C/C++ to identify rule violations and warnings.
- Fix any rule violations or warnings, then build, and run unit tests. If any changes break a unit test, debug and fix the code so the unit test runs successfully.
- Fix one rule violation or warning at a time. Repeat until the code conforms to the established code analysis baseline.
|
Exit Criteria
|
The code is analyzed and is within established guidelines for code analysis. | |
|
|
|
|
(C) 2005 Microsoft Corporation. All rights reserved.
MSF for CMMI Process Improvement: Build 050707 |
|