The Delphi Unit Dependency Scanner (or DUDS as it has become known) parses a Delphi project or group project and builds a unit file hierarchy.
The uses hierarchy can be displayed in several different ways, searched and sorted. Cycles are marked in the tree-view.
Unit relationships can be exported in several formats - XML, Gephi CSV and GraphML.
You can define modules (list of units or directory-paths) and allowed module dependencies. Actual module dependencies will be analyzed and dependency violations will be reported to the log.
By exporting modules to ".graphml" you can use a graphML-enabled tool like yEd to get an overview of your modules architecture.
It is possible to rename units
- one by one
- using regex expressions
- using a batch import from csv
DUDS does NOT help to extract the code - but it helps to adjust the uses lists. This is especially helpful when the change affects a lot of files (e.g. > 500) and changes must be made to units of different packages & projects. DUDS can add your target unit (new unit or existing unit) to the uses list of all files that already referenced the unit you extracted your code from.
You can use the output of a Pascal Analyzer (© Peganza) Uses
report to batch delete unused units.
See Docs\Version History.txt
This project was originally developed by Paul Spencer Thornton and the repository was cloned from norgepaul/DUDS. For more history, see there.
Parsing of the uses lists does not respect compiler switches. This is useful for renaming across multiple projects with different switches set and not considered as a bug. Parsing uses the lexer (NOT the parser) from DelphiAST.
DUDS is built with Delphi 10.3.3. The following 3rd party libraries are required - they can be installed via GetIt.
- VirtualTreeView
- SynEdit
3rd party code from DelphiAST is included in the repository.
Ready to use executable is located in src\build\bin\Win32\Release
.