...
This and all the following analysis types are performed with a built-in or user-defined test configuration; see Configuring Test Configurations.
Info | ||||
---|---|---|---|---|
| ||||
dotTEST can perform pattern-based analysis on .NET Core projects, but some rules are not supported. See .NET Core Supported Rules for the list of rules that are available when you run analysis on .NET Core projects. |
Info | ||||
---|---|---|---|---|
| ||||
You can run Microsoft Code Analysis rules with dotTEST - using the standard dotTEST static analysis workflow and reporting capabilities. This requires Visual Studio 2013, 2015, 2017, or Build Tools for Visual Studio 2017 to be installed on your machine. Microsoft Code Analysis is not supported for .NET Core projects. |
Code Duplication Analysis
dotTESTcan check for duplicate code to help you improve application design and decrease maintenance costs. During code duplication analysis, the code is parsed into smaller language elements (tokens). The tokens are analyzed according to a set of rules that specify what should be considered duplicate code. There are two types of rules for analyzing tokens:
...
- By using the test configuration interface in DTP (see "Report Center> Test Configurations> Editing Test Configurations> Metrics Tab" in the Development Testing Platform DTP user manual for details).
- By editing the Metrics test configuration using the interface in an IDE (see Creating Custom Test Configurations).
- By manually editing the test configuration file:
1. Duplicate the built-in Metrics test configuration (
[INSTALL_DIR]/configs/builtin
) to the user configurations directory ([INSTALL_DIR]/configs/user
).2. Open the duplicate configuration in an editor and set the
[METRIC.ID].ThresholdEnabled
property totrue
.3. Configure the lower and upper boundaries in the
[METRIC.ID].Threshold
property according to the following format:[METRIC.ID].Threshold=l [lower boundary value] g [upper boundary value]
4. Save the test configuration and run the analysis using the custom metrics test configuration.
...