User Guide: CLI: Anti-pattern Commands
DV8 Console Commands - Anti-pattern Commands
Anti-pattern Commands
This command detects architecture anti-patterns based on a DSM file. If the DSM file includes history data, DV8 will detect all six types of anti-patterns; without history data, only three anti-patterns are detected.
Usage
dv8-console arch-issue:arch-issue [-cliqueDepends <CLIQUE-DEPENDTYPE>] [-crossingCochange <CROSSING-COCHANGE>] [-crossingFanIn <CROSSING-FANIN>] [-crossingFanOut <CROSSING-FANOUT>] [-h] [-mvCochange <MODULARITYVIOLATION-COCHANGE>] -outputFolder <OUTPUTFOLDER> [-uiCochange <UNSTABLEINTERFACE-COCHANGE>] [-uihDepends <UNHEALTHYINHERITANCE-DEPENDTYPE>] [-uihInheritance <UNHEALTHYINHERITANCE-INHERITANCETYPE>] [-uiHistoryImpact <UNSTABLEINTERFACES-HISTORYIMPACT>] [-uiStructImpact <UNSTABLEINTERFACE-STRUCTIMPACT>] DSM_FILE
Input
A DSM file (*.dv8-dsm
) generated by DV8. If the DSM file contains history data, the output anti-pattern DSMs will also include history information.
Options
cliqueDepends:
(For Clique detection) Specifies the dependencies filtered for clique detection. Multiple dependencies should be delimited by commas (e.g., imports,includes,writes
). Use *
to select all dependency types. Default: call,use
.
crossingCochange:
(For Crossing detection) Threshold of co-changes between two files. Default: 2
.
crossingFanIn:
(For Crossing detection) Specifies the number of other files that depend on a file (>= "crossingFanIn"). Default: 4
.
crossingFanOut:
(For Crossing detection) Specifies the number of files that a file depends on (>= "crossingFanOut"). Default: 4
.
mvCochange:
(For Modularity Violation detection) Threshold of co-changes between two files. Default: 2
.
outputFolder:
The directory where the detected architecture issues will be saved.
uiCochange:
(For Unstable Interface detection) Threshold of co-changes between two files. Default: 2
.
uihDepends:
(For Unhealthy Inheritance detection) Specifies the dependencies filtered for unhealthy inheritance detection. Multiple dependencies should be delimited by commas (e.g., imports,includes,writes
). Use *
to select all dependency types. Default: call,use
.
uihInheritance:
(For Unhealthy Inheritance detection) Specifies the dependencies for unhealthy inheritance detection. Multiple dependencies should be delimited by commas (e.g., extend,implement,base
). Default: extend,implement,public,private,virtual public
.
historyImpact:
(For Unstable Interface detection) Specifies the number of co-changed files (more than the co-change
threshold) to detect history impact. Default: 10
.
uiStructImpact:
(For Unstable Interface detection) A value < 1
indicates the percentage of all files that are dependents (e.g., 0.01
means 1% of all files). A value >= 1
refers to the absolute number of dependents (e.g., 10
means the file has at least 10 dependents). Default: 0.01
.
Example
dv8-console arch-issue:arch-issue -outputFolder arch-issue -uiCochange 2 -crossingCochange 2 -mvCochange 2 -uiStructImpact 0.01 -historyImpact 10 -crossingFanIn 4 -crossingFanOut 4 -cliqueDepends "call,use" -uihDepends "call,use" -uihInheritance "extend,implement,public,private,virtual public" merged-dsm.dv8-dsm