Professional Visual Studio 2005 Team System (Programmer to Programmer)

Overview

Team System ships with several testing tools for C and C++ programmers. For example, AppVerifier provides support for dynamically testing unmanaged applications. Another feature, Code Analysis for C/C++ (also known as PREfast) is an integrated static code analyzer that enables you to detect security and coding defects during compile time. Here is what Code Analysis for C/C++ has to offer:

Note

Code Analysis for C/C++ does not support .NET code. The best static testing tool for .NET code is the Managed Code Analysis tool (best known as FxCop), covered in Chapter 8. Microsoft Research is currently working on a version of PREfast for the C# language called PREsharp. PREsharp information is available on the following Microsoft Research website: http://www.microsoft.com/windows/cse/pa/pa.mspx.

Code Analysis for C/C++ is an extremely important and useful tool in Microsoft's internal software development process. They have used it extensively in the development and testing of Windows 2000, Windows Server 2003, and Windows XP. It also has been used for application security audits companywide for both the Trustworthy Computing and Secure Windows Initiatives. Code Analysis for C/C++ has been an integral tool for testing and securing the codebase for Windows XP Service Pack 2, and continues to be in wide use for a number of other products.

Note

Code Analysis for C/C++ is only available in Visual Studio 2005 Team Developer and the Team Suite versions of Team System.

Three core versions of Code Analysis for C/C++ are currently available from Microsoft (some are still referred to as PREfast). Each version has its own specific capabilities and documentation:

Team System's C/C++ static code analyzer has been specifically designed for Win32 code on the x86 platform, as 64-bit support is not currently available.

In this chapter, we describe the advantages and challenges of static code analysis. You will learn how to use Code Analysis for C/C++ within Team System, including how to enable it, manage it, control it, and integrate and share the results on Team Foundation Server using check-in policies and bug work items. Finally, you will learn how to extend the C/C++ static code analysis engine using #pragma directives and inline annotations.

Категории