Coding

Analyze the Quality of .NET Code with NDepend

Meet NDepend

NDepend is a Visual Studio tool to help you achieve good code quality. It allows you to measure software quality using Code Metrics and visualize with graphs and templates. You can use it as a standalone application or can run it inside the Visual Studio as well. It analyses the quality of the code and you will be presented with a HTML report.

Quick Installation

It comes with an easy installation process and you are only required to run a Zip file. You can create new project and add assemblies you want to be analyzed. It provides you with an HTML report as well as an interactive report giving you detail of every code.

Here are the features of NDepend:

Code query

NDepend comes with support for code query over CQLing to allow one to write custom queries over the code. It has over 150 default code rules to check. Also, writing CQLing queries and constraints is straightforward. It also provides an editor which supports code completion, live compile error description and integrated tooltip documentation.

ndepend

Code Metrics

NDepend supports Lines of Code, Cyclomatic Complexity, Coupling, Nesting Depth, Rank and lots more. It comes with 82 other code metrics, some of them related to code quality, some to the structure of code and some to the code coverage. It displays an interactive view of code metrics of .NET applications.

ndepend

Code Quality Trends

It allows you to keep track of your code base quality metrics. You will get Trend Charts about any code metrics and these are displayed on the dashboard. It offers more than 50 trend metrics per default and the trend charts show lines of code, number of code rules violated and number of code rules violations, code coverage per tests, third-party usage as well as max and average values for various code quality metrics.

ndepend

Diagrams

Thanks to the unique diagramming capabilities of the tool, it spots too complex code at a first glance. NDepend provides you various types of visual diagrams to let you access the overall state of your code. It offers you treemap metric, trend charts, dependencies matrix, dependencies graph as well as abstractness vs. instability.

ndepend

Dependency Cycles

This simple to use tool allows you to avoid dependency cycles between the components. Whether the components are classes, assemblies, namespaces or a mix in between, it is capable of detecting the dependency cycles between them and help you find the right way to get rid of a particular dependency cycle.

Ndepend

Compare Builds

For developers, it is essential to consider the modifications in code bases. This tool can tell you what has been changed between two builds. It has the ability to distinguish between comment change and code change as well as between what has been added/removed and justified. This helps you to analyze the differences between two versions of the source code files.

Ndepend

Efficient Architecture Dependency Management

With NDepend, you will get to know which part of the code will be impacted when you refactor a class within a few seconds. This makes managing and analyzing dependencies simpler and quicker than ever. It allows you to pinpoint precisely which part of the code relies on a particular tier component.

ndepend

Information about Build Process Health

NDepend provides you useful information that helps you to get to know about the health of your build process. It offers details about assemblies versioning, assembly conflicts, PDB file issues as well as coverage file issues. You will get to know about corrupted or missing coverage files in real-time.

ndepend

Comprehensive Reporting

NDepend offers you a report informing about the status of your development. It gives you enough flexibility to customize the sections and you can also provide your own XSL sheet for complete customization. Also, you can build your own CQLing rules that will be checked at each analysis.

ndepend

Wrapping Up

All-in-all, NDepend is a fantastic tool that gives you lot of information about your codebase. It comes with the ability to use as a part of your continuous integration process. It enables to you build your perfect set of rules.

You can give it a try by downloading the free trial from the official website. Let us know your thoughts in the comments.

You Might Also Like