Delphi-RAG-Lint

drag-lint help

callgraph

Since: 0.91.0-alpha

Prints an N-deep resolved call tree for a symbol, in either direction.

Read this when you want to know who calls a routine, or what it calls, several levels deep. callgraph prints an N-deep resolved call tree for a symbol in either direction, guarded against cycles. The IDE menu item always walks 3 levels; the CLI takes --depth.

How to run it

Full flag list: callgraph in the CLI reference.

Flags

FlagArgumentMeaningDefault
--qname<X>
--direction
--depthN
--dbPATH
--json
--format

Where to click

  • RAD Studio main menu: drag-lint > Uses & Dependencies > Call Tree (callers or callees, N-deep)...
    1. Put the caret on the routine in the editor (the name box is prefilled from the caret)
    2. Choose drag-lint > Uses & Dependencies > Call Tree (callers or callees, N-deep)...
    3. Confirm the qualified name, then answer Yes for callers or No for callees; the depth is fixed at 3 in the IDE (use the CLI --depth for other depths) and the call tree opens as a report

Needs: index

Details

Prints an N-deep resolved call tree for a symbol, in either direction. Reach for it to see who calls a routine or what a routine calls, several levels deep, from the CLI.

Running it from the CLI

drag-lint callgraph --qname <X> [--direction callers|callees] [--depth N] --db PATH [--json]

--qname <X> is the symbol to root the tree on. --direction selects callers or callees (which one is the default is not documented in the usage line). --depth N bounds how deep the tree walks; the tree is cycle-guarded. --json emits machine-readable output.

What it needs

An index IS required. The project's DB lives at <project folder>\_D-RAG\<project file>.sqlite; run drag-lint resolve-dbs --project <X.dproj> if unsure.

Example

Illustrative only:

drag-lint callgraph --qname CustomerOrder.TCustomerOrder.Total --direction callers --depth 3 --db C:\Projects\MyApp\_D-RAG\MyApp.sqlite --json

This would print the 3-deep tree of everything that (transitively) calls Total.


All features | CLI reference | IDE menus