Delphi-RAG-Lint

drag-lint help

Find Dead Code

Since: 0.25.0-alpha

Scans the index for code with no references -- candidates to delete.

Read this before a cleanup pass or before deleting something you suspect is unused: find-deadcode scans the index for symbols with no references and lists them as candidates. Filter with --kind, add --include-private for private members; also under drag-lint > Code Quality.

How to run it

Full flag list: find-deadcode in the CLI reference.

Flags

FlagArgumentMeaningDefault
--kind
--include-private
--dbPATH

Where to click

  • RAD Studio main menu: drag-lint > Code Quality > Find Dead Code...
    1. Needs an index of the project
    2. drag-lint > Code Quality > Find Dead Code...
    3. Review the listed symbols; they are candidates to delete, not proof

Details

Scans the index for code with no references -- candidates to delete. Reach for it before a cleanup pass or before removing something you suspect is unused.

Running it from the CLI

drag-lint find-deadcode [--kind method|function|...] [--include-private] [--db PATH]

--kind filters by symbol kind (for example method or function); --include-private also considers private members.

What it needs

The --db flag is optional -- drag-lint auto-resolves the project's index when omitted. An index must still exist.

Example

Illustrative only:

drag-lint find-deadcode --kind method --db C:\Projects\MyApp\_D-RAG\MyApp.sqlite

This would list methods in MyApp's index with no resolved references.


All features | CLI reference | IDE menus