Saturday, May 17, 2014

NDepend V5: Improvments and New Features

 Improvments and New Features:
      NDepend is improving day by day, and with the release of version (V5) more features and enhancements are onboard. I started using NDepend from last year, and I used it often for improving my development capabilities and coding technique. NDepend makes it easier for you to analyze the code and identifies the lacking areas and give you a brief guide about best practices.

Following are the key features/improvements over previous release:
  • Report Enhancements:  
                With the release of the NDepend V5 the reports are redesigned and trend metric charts are also included in reports. Following are the sections vaialble in the reports:
    • Rules
    • Trend Charts
    • Metrics
    • Dependencies
    • Object Oriented Design
    • API Breaking Changes
    • Code Diff Summary
    • Test and Code Coverage
    • Dead Code
    • Build Order
    • Analysis Log
NDepend Report showing analysis result

  • Dashboard Panel
 Dashboard panel gives a summarized view of the analysis of the code base.
Dashboard Panel (Visual Studio)

Dashboard Panel Showing Rules Summary (Visual NDepend)
Dashboard Panel Showing Trend metric (Visual NDepend)
  • Trend Monitoring
                With NDepend we can create trend charts. Trend charts are made of trend metrics whose values are  logged over time at analysis time. As default some trend metrics are available and it is easy to create your own trend metrics. Trend charts are displayed on the NDepend dashboard. NDepend dashboard shows following default trend charts:
  • Lines of Code
  • Number of Code Rules Violated and number of Code Rules Violations
  • Code Coverage per Tests
  • Max and Average values for various Code Quality Metrics
  • Third-Party UsageTrend charts are displayed on the NDepend dashboard.

Trend charts can be customized and it is easy to create your own trend charts to show default or custom trend metrics.
Trend metrics options available in NDepend
Trend metric
  • Support for Visual Studio
             NDepend is fully integrated with visual studio stack. Using visual studio Add-in you can add NDepend support to visual studio, and you are able to see all the reports, trend charts, dashboard, etc in the visual studio. Another option is Visual NDepend UI, using Visual NDepend you can view the analysis results standalone.
Visual studio Add-in options
  • More Recent Rules violation
              With this feature we can compare two different NDepend projects and see the results after comparing with the Baseline project. This feature is useful in order to determine what rules are violated since the last analysis done.
Dashboard showing Recent Rule violation and code differences  found

  • Better Path Management
                  NDepend provides better path management support, following path are supported by NDepend:

                   Absolute : with drive letter C:\ or UNC \\Server\Share format.
                   Relative : to the NDepend project file location.
                   Prefixed with an environment variable with the syntax %ENVVAR%\Dir\
                   Prefixed with a path variable with the syntax $(Variable)\Dir

Path referenced in NDepend and supported paths

  • More Console Options
                Following are the console options available in the NDepend:             
//  NDepend v5.2.1.8320
//  Copyright (C) Patrick Smacchia 2004-2014
//  All Rights Reserved

NDepend accepts these arguments:
  /ViewReport                 to view the HTML report

  /Silent                     to disable output on console

  /HideConsole                to hide the console window

  /Concurrent                 to parallelize analysis execution
  /LogTrendMetrics            to force log trend metrics
 /TrendStoreDir              to override the trend store directory specified in the NDepend project file.

  /PersistHistoricAnalysisResult   to force persist historic analysis result

  /HistoricAnalysisResultsDir to override the historic analysis results directory specified in the NDepend project file.

  /OutDir dir                 to override the output directory specified in the NDepend project file.

  /XslForReport xlsFilePath   to provide your own Xsl file used to build report

  /InDirs [/KeepProjectInDirs] dir1 [dir2 ...]
                              to override input directories specified in the NDepend project file.

  /CoverageFiles [/KeepProjectCoverageFiles] file1 [file2 ...]
                              to override input coverage files specified in the NDepend project file.

  /PathVariables Name1 Value1 [Name2 Value2 ...]
                              to override the values of one or several NDepend project path variables, or
                              create new path variables.

                              to provide a previous analysis result to compare with.

  /Help                       to display the current help on console