FxCop
   HOME

TheInfoList



OR:

FxCop is a free
static code analysis In computer science, static program analysis (or static analysis) is the analysis of computer programs performed without executing them, in contrast with dynamic program analysis, which is performed on programs during their execution. The term i ...
tool from
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
that checks .NET
managed code Managed code is computer program code that requires and will execute only under the management of a Common Language Infrastructure (CLI); Virtual Execution System (VES); virtual machine, e.g. .NET, CoreFX, or .NET Framework; Common Language Runti ...
assemblies for conformance to Microsoft's .NET Framework Design Guidelines.


Overview

Unlike StyleCop, or the
Lint programming tool Lint, or a linter, is a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs. The term originates from a Unix utility that examined C language source code. History Stephen C. Johnson, a co ...
, for the
C programming language ''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as ...
, FxCop analyzes the compiled
object code In computing, object code or object module is the product of a compiler. In a general sense object code is a sequence of statements or instructions in a computer language, usually a machine code language (i.e., binary) or an intermediate langua ...
, not the original
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the wo ...
. It uses CIL parsing and callgraph analysis to inspect assemblies for more than 200 different possible coding standards violations in the following areas: *COM (Interoperability) – rules that detect COM Interop issues. *Design – rules that detect potential design flaws. These coding errors typically do not affect the execution of your code. *Globalization – rules that detect missing or incorrect usage of information related to globalization and localization. *Naming – rules that detect incorrect casing, cross language keyword collisions, and other issues related to the names of types, members, parameters, namespaces, and assemblies. *Performance – rules that detect elements in your assemblies that will degrade performance. *Security – rules that detect programming elements that leave your assemblies vulnerable to malicious users or code. *Usage – rules that detect potential flaws in your assemblies that can affect code execution. *Maintainability – rules that detect maintenance issues. *Portability – rules that detect portability issues. *Reliability – rules that detect correct memory and thread usage. FxCop includes both
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
and command line versions of the tool. Microsoft
Visual Studio 2005 Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such a ...
and
Visual Studio 2008 Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platfor ...
Team System Development Editions both include a "Code Analysis" feature based on FxCop. For Visual Studio 2010 the corresponding, and slightly enhanced, static code analysis features are included in the Premium and Ultimate editions. FxCop 10.0 is included in the
Microsoft Windows SDK Microsoft Windows SDK, and its predecessors Platform SDK, and .NET Framework SDK, are software development kits (SDKs) from Microsoft that contain documentation, header files, libraries, samples and tools required to develop applications for Micr ...
for
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearly ...
.Code Analysis Team Blog: FxCop 10.0 is available
/ref> FxCop provides a tool to help developers to follow their company's coding standards. FxCop does code analysis to check whether the new code is compliant with the coding standards and naming conventions followed by the company. FxCop will ensure that the specified rules are used in the source code.


See also

*
List of tools for static code analysis This is a list of notable tools for static program analysis (program analysis is a synonym for code analysis). Static code analysis tools Languages Ada * * * * * * * * * * * C, C++ * * * * * * * * * * * * ...
* StyleCop


References


External links


FxCop 2.0 home pageFxCop blogFxCop: Policing Code Correctness
- Addison-Wesley
FxCop v1.36 no longer available for downloadFxCop: Downloading the most recent versionFxCop 10.0
{{Microsoft development tools .NET programming tools Static program analysis tools Microsoft development tools