Delphi-RAG-Lint

drag-lint help

Uses Audit -- interface->impl moves + unused (this unit)

Since: 0.43.0-alpha

For one unit, reports which uses entries could move from the interface section to implementation, and which are unused entirely.

Read this when tidying the uses clauses of one unit: it reports which entries could move from the interface section to implementation and which are not used at all.

How to run it

Full flag list: uses-audit in the CLI reference.

Flags

FlagArgumentMeaningDefault
--db<file.sqlite>
--format

Where to click

  • RAD Studio main menu: drag-lint > Uses & Dependencies > Uses Audit -- interface->impl moves + unused...
    1. Open the unit in the editor
    2. Choose drag-lint > Uses & Dependencies > Uses Audit -- interface->impl moves + unused...
    3. Read the suggested moves and the unused entries
    4. From a shell: drag-lint uses-audit <unit.pas> --db <file.sqlite> [--format json|text]

Needs: index

Details

For one unit, reports which uses entries could move from the interface section to implementation, and which are unused entirely. Reach for it when cleaning up a single unit's uses clauses before a rename or refactor.

Running it from the CLI

drag-lint uses-audit <unit.pas> --db <file.sqlite> [--format json|text]

What it needs

Required. You must have indexed the project first -- the audit resolves symbol usage against the index, not by re-parsing the unit alone.

Example

Illustrative only:

drag-lint uses-audit C:\Projects\MyApp\CustomerOrder.pas --db C:\Projects\MyApp\_D-RAG\MyApp.sqlite --format text

This would report, for CustomerOrder.pas, which units in its uses clause (for example one only referenced by a class such as TCustomerOrder) could move to implementation, and which are not referenced at all.


All features | CLI reference | IDE menus