|
|
|
|
|
|
|
|
|
MSF for CMMI Process Improvement > Wiki Pages > Activity - Perform Code Analysis
|
Activity - Perform Code Analysis
|
|
|
|
|
|
Activity Information Perform Code Analysis
DescriptionCode 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. Attributes| Element Categories | [CMMI Track 3] Build, [CMMI Level 3] VER SP 2.1, [CMMI Cycle 6] As Needed | | Entry Criteria | Source code for the development task.: Source code for the development task.
Applicable rules.: Applicable rules.
Code analysis guidelines.: Code analysis guidelines. | | Exit Criteria | The code is analyzed and is within established guidelines for code analysis.: The code is analyzed and is within established guidelines for code analysis. | | Is Required | Yes |
StepsAnalyze 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. 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.
|
Last modified at 12/19/2007 10:37 AM by Administrator
|
|
|
|
 |
 |
 |
 |
|