Code Analyzer tool enables programmers and QA managers to
check C# source for compliance with coding standards and best practices.
Code analyzer enables to define your own "policy", which consists of set of
rules that define how the code should look like. Rules may relate to
different aspects of the code like naming of elements, organization of the
code, commenting of the code, using of namespaces and more. Rules are
organized in navigable hierarchy and your can easily choose, which
rules you want to use. And what is the best rules are totally extensible.
With Code Analyzer Rules SDK you can easily develop your own rules of any
kind. Rules can be written in any .NET language and compiled to assembly,
which can be included into Code Analyzer policy.
Once you have policy defined you can use Code Analyzer to analyze code
(naturally organized into solution and projects) and create reports, which
contain all violations of policy rules described in detail and related to
source code position. Reports created by Code Analyzer are again very
flexible, you can create your own report or modify existing.
MAIN CODE ANALYZER FEATURES
- Easy and intuitive interface in style of modern IDEs (VS.NET)
- Source code files are organized in solution and projects, which can be
- For analysis code is parsed into CodeDom syntax tree
- Code analysis (checks) are driven by general rules, which works with
CodeDom structures. There are several basic rule types, depending on which
code elements they work with:
- Assembly Rule
- Compilation Unit Rule
- Namespace Rule
- Type Rule
- Member Rule
- Parameter Rule
- Rules are organized into categories and categories are then organized into common hierarchy (called
Policy), which enables easy navigation and selection of rules. Within
policy rules (or whole rules categories) can be activated or deactivated. Code
Analyzer present policy
as three state tree view, which enables maximum efficiency in policy
- Rules are flexible and extensible, using Rules SDK anybody can write
his own rules. Any .NET language can be used for rules creation. New rules
should be compiled into assembly, which than can be easily added to Code
- Out of box code analyzer contains a set of sample rules for code
elements naming, document comments and more.
- Results of code analysis are displayed in reports. Report contains
details about all violations of policy rules and their position in source
- Code Analyzer reports are flexible and extensible, you can create your
own reports or modify existing.
- Our of of box Code Analyzer contains Grid Report, HTML Report and XML
Report. Grid report contains detail with source code view, where
problematic code element is highlighted.
For screenshots of Code Analyzer see this
COMPARISON WITH SIMILAR TOOL
Similar tool to Code Analyzer is Microsoft FxCop. FxCop works with
compiled assemblies and uses metadata to get information about the code. It
also has extensive set of rules, which are based on MS Coding practices for
FxCop advantages (comparing to Code Analyzer):
- Extensive set of rules available out of box. Code Analyzer provides
just limited set of sample rules.
- Since it works with assembly metadata works with code created in any
.NET language. Code Analyzer works now just with C# sources.
Code Analyzer advantages (comparing to FxCop):
- FxCop is limited to assembly metadata, Code Analyzer works with source
code and provides more functionality like comments, position in source
code and more.
- FxCop has flat rules structure, which makes orientation in policy more
difficult for larger policies. Code analyzer has hierarchical structure,
based on logical rules categories.
- FxCop provides only one type of report, Code Analyzer is flexible
and provides more report types and users can create their own report types.