Code Analysis is one of the most important activity in development project lifecycle.
Its used mainly for following :
- Analyzing coding standards
- Understand Code Structure
- Finding code performing badly
- Viewing metadata of assemblies
- Finding binding closures
- Detecting circular dependencies
There are many tools like Visual Studio code analysis tool, FxCop, ildasm etc. which helps in achieving one or more of above but not all.
But there is one tool which helps in achieving all of them plus lot of other things like build comparisons.
NDepend is a very popular non-intrusive tool from C# MVP Patrick Smacchia used for code analysis and trial is available for free download. It can be integrated with your build process and has both GUI and command line interface.
It also introduces SQL - Like language called 'Code Query Language' for querying code based on attributes and constraints.