Harman Patil (Editor)

NDepend

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Developer(s)
  
NDepend

Type
  
Software quality

Operating system
  
Windows

Website
  
ndepend.com

NDepend

Stable release
  
2017.1.0 / January 20, 2017; 57 days ago (2017-01-20)

License
  
Commercial, Proprietary

NDepend is a static analysis tool for .NET managed code. The tool supports a large number of code metrics, allowing to visualize dependencies using directed graphs and dependency matrix. The tool also performs code base snapshots comparisons, and validation of architectural and quality rules. User-defined rules can be written using LINQ queries. This feature is named CQLinq. The tool also comes with a large number of predefined CQLinq code rules. Code rules can be checked automatically in Visual Studio or during continuous integration.

Contents

Features

The main features of NDepend are:

  • Dependency Visualization (using dependency graphs, and dependency matrix)
  • Software metrics (NDepend currently supports 82 code metrics: Cyclomatic complexity; Afferent and Efferent Coupling; Relational Cohesion; Google page rank of .NET types; Percentage of code covered by tests, etc.)
  • Declarative code rule over LINQ query (CQLinq)
  • Integration with CruiseControl and TeamCity
  • Optional code constraints in the source code using CLI attributes
  • Version comparison of two versions of the same assembly
  • New features in v2017.1

  • NDepend.API Improvements
  • Code Query Improvements
  • Report Improvements
  • Enhanced Baseline Experience
  • Default Rules-Set Improvements
  • Dashboard Improvements
  • Enhanced Visual Studio Integration
  • Planned support for VS2017 / dev15
  • .NET Core support
  • Better Issues Management
  • Quality Gates
  • Smart
  • Technical Debt
  • Estimation
  • New support for Visual Studio
  • Team Services (VSTS)
  • New licensing and release scheme
  • New features since V6.0

  • Integration with Visual Studio 2015
  • Enhanced Visual Studio Integration
  • Colored Code Metric View
  • Intuitive display of Code Coverage percentage
  • Rule Files Shareable amongst Projects
  • Default Rules Description and HowToFix
  • Default Rules Less False Positives
  • Compiler Generated Code Removal
  • Async Support
  • Integration with TFS
  • Integration with SonarQube
  • Integration with TeamCity
  • Support Visual Studio Themes
  • Support for high DPI resolution
  • Code rules through LINQ queries (CQLinq)

    All recent versions of the tool (after V4) proposes live code queries and code rules through LINQ queries. This is one of the main innovations of NDepend. For example:

    - Base class should not use derivatives:

    // <Name>Base class should not use derivatives</Name> warnif count > 0 from baseClass in JustMyCode.Types where baseClass.IsClass && baseClass.NbChildren > 0 // <-- for optimization! let derivedClassesUsed = baseClass.DerivedTypes.UsedBy(baseClass) where derivedClassesUsed.Count() > 0 select new { baseClass, derivedClassesUsed }

    - Avoid making complex methods even more complex (source code cyclomatic complexity):

    // <Name>Avoid making complex methods even more complex (source code cyclomatic complexity)</Name> warnif count > 0 from m in JustMyCode.Methods where !m.IsAbstract && m.IsPresentInBothBuilds() && m.CodeWasChanged() let oldCC = m.OlderVersion().CyclomaticComplexity where oldCC > 6 && m.CyclomaticComplexity > oldCC select new { m, oldCC, newCC = m.CyclomaticComplexity, oldLoc = m.OlderVersion().NbLinesOfCode, newLoc = m.NbLinesOfCode, }

    Additionally, the tool proposes a live CQLinq query editor with code completion and embedded documentation.

    References

    NDepend Wikipedia