Enhanced Visual Studio Integration
- NDepend Windows location / size / docking status are now properly stored and restored across Visual Studio executions.
- NDepend Visual Studio extension is now based on VS package API (VSIX), while it was based on VS Addin API.
As a consequence the extension is faster to load and the overall extension stability is strengthened.
- Full support of Visual Studio keyboard shortcut assign + easy way to set/reset default NDepend shortcut.
- Enhanced NDepend global menus.
- When a code element right clicked in VS is yet unknown to NDepend,
a menu proposes to either add the parent assembly to the list of assemblies to analyze,
or, if the parent assembly is already there, the menu proposes to refresh the analysis result
by re-building the VS solution and then re-running the NDepend analysis.
- A NDepend project can now be attached to a VS solution file (.sln) or to a VS solution user options file (.suo).
- When attaching a NDepend project to a VS solution file (.sln) the user is not prompted anymore to reload the solution.
The VS solution file is written when closing the solution, or when requiring VS Save All.
- NDepend context menus are now also available from Solution Explorer > Solution node, and under Solution Explorer > Source File > Types, Methods and Fields nodes (VS2013 and VS2015 only).
- NDepend proposes 3 Visual Studio Build handy features:
Rule Files Shareable amongst Projects
- With NDepend v6, Rule Files can be created and shared amongst NDepend projects.
This is useful to define company-level standard rules sets, and get them applied by all teams.
Default Rules Description and HowToFix
- A detailed Description and HowToFix section has been added
for each default code rule. You can choose both in the NDepend UI and the NDepend report,
to view the rule description or source code.
- It is now possible to insert tags <Description> and <HowToFix>
in code rules source code comment.
Integration with TFS
- Integration with TFS2013 (TFS2015 not supported, TFS and Azure DevOps supported see more here).
- Both TFS Version Control and TFS Git scenarios are supported.
- Define thresholds to yield TFS build warning or error, upon number of NDepend Rules and Critical violations.
- An NDepend section is available in the TFS Build Summary. Verbose NDepend logs are available in the TFS Build Logs.
- The NDepend report can be opened from the TFS Build Summary
- A TFS Web Access extension is provided to open the NDepend report from the TFS Web UI.
- Facility to store and consolidate NDepend Trend Metrics across TFS builds
- Facility to define a TFS prior build as a NDepend baseline for comparison
- Automatic fetch of coverage files from TFS + automatic coverage files conversion bin to xml to let them be consumed by NDepend
- The NDepend analysis process is spawned across a dozen of TFS activities.
2 default Build templates Tfvc and Git are proposed to invoke these activities.
Advanced scenarios can then be handled by invoking these activities from custom Build template.
Documentation Integrate NDepend with TFS.
Integration with SonarQube
- Integration with SonarQube v5.
- Both NDepend default and custom code rules can be monitored by SonarQube.
- NDepend rules parent group names are used as SonarQube rules tags
- Visualization of the NDepend issues locations in source code from within the SonarQube UI.
- New NDepend rules Descriptions and HowToFix sections are also visible from the SonarQube server plugin.
- The communication from NDepend to SonarQube occurs through XML files: hence NDepend must run on Windows but the SonarQube server can run on any OS.
Documentation Integrate NDepend with SonarQube.
|
Colored Code Metric View
- The Metric View can now display a second metric by coloring the treemap elements. Hence two code metrics can be displayed at once.
- For example by setting Size metric to number of lines of code vs. Color metric to percentage code coverage, we can get a global, yet accurate, view of where the code base is not enough covered by tests.
- The screenshot below shows the NDepend v6 code base, 160K Lines of Code 82% covered by tests. We know at a glance where we've been good and where more tests effort should be spent.
- By choosing adequate pairs of metrics, many other insightful views can be obtained, relative to code quality, code flaws, code structure, code diff...
- Coloring can be customized and custom code metrics, defined through CQLinq querying, can be displayed as well as size or color metric.
Compiler Generated Code Removal
- Types and methods generated by the C# and VB.NET compilers to handle language constructs like lambda, iterators, anonymous and asynchronous methods, are now merged within their declaring methods.
- The merging is smart. This feature doesn't have any impact on code metrics (# Lines of Code, Percentage Coverage...), nor dependencies, nor diff, nor source code declarations.
- De-facto classes and methods generated by the compiler don't confuse anymore dependencies Graph and Matrix, nor code Queries and Rules results.
- This feature is set by default and can be disabled if needed, through an NDepend project option.
Async Support
When using the option Compiler Generated Code Removal:
- Async methods can be filtered in or out, in code queries/rules through the new property IMethod.IsAsync
- The bug where async methods were not seen as called because at IL level, a method named MoveNext() generated by the compiler was actually used instead, is fixed.
- Dependencies toward the .NET Fx async infrastructure (IAsyncStateMachine, Task<TResult>, AsyncTaskMethodBuilder<TResult> ...) are preserved.
Analysis Enhancements
- A directory that contains coverage file(s) to parse to import coverage data, can now be specified in the coverage section of a NDepend project.
This facility is useful to just dump all coverage files in a directory at build time, without having to care for their number, nor their names, nor the .NET code coverage technology used.
- When multiple valid assemblies with same name are found in the set of directories referenced by a NDepend project,
instead of reporting an error, one is chosen according to this logic:
First the one with highest version,
else, the one with biggest file size
else the one most recently modified
else any single one, they are reported as all same.
-
In VisualNDepend.exe Windows taskbar, loading and analyzing progress is shown.
Support Visual Studio Blue, Dark, Light Themes
-
The NDepend theme can be changed anytime from the NDepend Options dialog,
and it gets automatically updated when changing the Visual Studio theme.
- The Visual Studio 2010 Blue theming is also automatically chosen when working with this VS version.
Support for high DPI resolution
- The NDepend UI now scales properly whatever the DPI settings, 100%, 125%, 150%, 200% and 250%. Notice that:
- Dependency Matrix cell side zoomed can now scales up to 60 pixels.
- Treemap drawing and refreshing processing is faster.
- Many dialogs have been improved.
Integration with TeamCity
- Integration with TeamCity v8 and v9
- New NDepend TeamCity Build Step that takes a NDepend project to analyze
- NDepend report integrated into TeamCity build result
- NDepend Rules violations mapped as TeamCity inspections and TeamCity statistics
- NDepend Critical Rules violations mapped as TeamCity errors and TeamCity statistics
- Facility to store and consolidate NDepend Trend Metrics across TeamCity builds
- Facility to define a TeamCity prior build as a NDepend baseline for comparison
- NDepend report and analysis result stored as TeamCity build artefacts
- The TeamCity agent that runs NDepend must be a Windows machine, but the TeamCity server can run on any OS.
Documentation Integrate NDepend with TeamCity.
|