How to:
How to configure the NDepend Hub?
- Enable Scripts to access OAuth token
The NDepend task gets the baseline data stored in your build artifact to achieve
the comparison between two builds.
For that you need to enable scripts to access the OAuth token, that will permit
to access to the build artifacts using the DevOps Azure Rest API.
This option can be enabled from the build definition
configuration
- Add the NDepend task to your build workflow
If an unit test task is executed, please ensure that the NDepend task is executed after it.
- Configure the NDepend Task
- NDepend Project: Specify the NDepend project that contains your rules.The ndproj file is published as an artifact against the source directory. If it's not specified the default ones will be used.
- Exclude assemblies that match the regex patterns: This option is useful to exclude some dlls from the analysis, like the unit test ones.The regex patterns are separated by ';'.
- Analyse only Assemblies referenced from the .ndproj: This option is useful to focus only on a subset of all assemblies built by the build DevOps Azure build agent.
- Stop the Build when at least one Quality Gate fails.
- Enable the code coverage:
To get the coverage data from the DevOps Azure test task you need to activate the code coverage: