Delphi-RAG-Lint

drag-lint help

query regions

Since: 1.65.0-alpha

Counts or lists the indexed symbols inside each REGION of a unit, e.g. the DB-RAD regions of generated ORM code.

Read this to see what a region holds before regenerating or adopting it. --region matches an id, a key or a mask; a body-fragment region names its enclosing routine.

How to run it

drag-lint query regions [--in <path|tail|mask>] [--region <id|key|mask>] [--list] [--db ...] [--json]

Example:

drag-lint query regions --file <unit mask> --region <id> --list --db <db>

Full flag list: query in the CLI reference.

Flags

FlagArgumentMeaningDefault
--in<path|tail|mask>
--region<id|key|mask>
--list
--db
--json

Where to click

No IDE surface: this feature runs from the CLI (see How to run it).

Details

drag-lint query regions counts -- or with --list names -- the indexed symbols inside each {$REGION} of a unit. Its main use is the DB-RAD regions of generated ORM code: before repo update-orm regenerates a region, or repo adopt-regions marks unmarked code, you can see what the region holds.

drag-lint query regions [--in <path|tail|mask>] [--region <id|key|mask>] [--list] [--db <db>] [--json]
  • --in narrows to one unit (a path, a tail such as uORDERS.pas, or a mask such as *\OBJECTS\*).
  • --region matches the region id (DB-RAD 4), its key or a mask; DB-RAD 4 also matches DB-RAD 4 hash=...
  • A symbol counts when its declaration or implementation line is inside the region; locals and parameters are left out.
  • A region that holds only part of a routine body names the enclosing routine (inside X).
  • Exit 1 when nothing matches.

Regions are read from the source at query time, so no re-index is needed after adding a region marker (1.65, ORMQ165 T13).

Related: query find-callers --name <callee> --receiver-type <mask> keeps only the call sites whose receiver's static type matches (1.65, T14); see query find-callers.


All features | CLI reference | IDE menus