Overview |  | Roles |  | Work Items |  | Views |  | Index |  | Glossary |

Project Portal
| ### Next Steps Perform a Unit Test Review Code |
| Activity: Perform Code Analysis
Developer
|  |  |  | Implement a Development Task |  |
|  | Participating Roles Responsible: Developer
### Overview Code analysis is the process of checking native or .NET managed code against development guidelines. For .NET managed code, code analysis checks whether .NET managed code assemblies conform to the Microsoft .NET Framework Design Guidelines. The automated support inspects assemblies 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 stay in a zero defect state. For existing code bases with large number of rule warnings, the goal is to drive down the warnings by category. # Entry Criteria A development task is assigned and coded. Dependencies: Unit tests are written to reflect the functionality called for in the development task. # Sub-Activities
1 | Determine Applicable Rules | Find the applicable rules for the type of application. Consult the Microsoft .NET Framework Design Guidelines to understand which rules apply or use the appropriate setup file for automated checking.
2 | Stay in Zero Defect State | Check code for rule conformity. Fix any deviations or warnings, build, and run unit tests. If any changes break a unit test, debug and fix the code so the unit test runs successfully. Apply one rule at a time or fix one warning at a time if manual. Repeat until all of the rules are checked or all warnings are gone.
3 | Drive Down Defects by Category | For existing code bases with a large number of conformity issues, establish an issue baseline. If automation is used, determine the number of warnings in the existing code base. Pick a category of rules or warnings for the project. Communicate this category to the development team. The goal is to drive out any rule violations and not to add any new violations to the baseline. When changing the code for a development tasks, eliminate conformity issues in the area. Apply the category over the area that is being changed as part of the development task. Fix any conformity issues in this area. Complete tasks to stay in zero defect state.
# Exit Criteria
| The code is reviewed to satisfy the design and coding standards.
(C) 2005 Microsoft Corporation. All rights reserved. Build 97 |