Delphi-RAG-Lint

drag-lint help

CLI reference

Every drag-lint command, with its usage and the features that describe it.

Commands

allow

Records a dl:ok review of one finding, so it stops being reported without being fixed.

drag-lint allow <file> --fix-line <L> --fix-rule <id> [--apply] [--rules-dir <dir>] [--config <file>] [--profile <name>] [--enable id,...] [--disable id,...] [--stand-in-for <realpath>] (record a dl:ok review of ONE finding; dry-run without --apply; the lint options decide which findings the line has)
FlagArgumentMeaningDefault
--fix-line<L>
--fix-rule<id>
--apply
--rules-dir<dir>
--config<file>
--profile<name>
--enable
--disable
--stand-in-for<realpath>

Described in:

ambiguous-calls

Resolver-coverage diagnostic that reports call sites the engine could not pin to exactly one target -- unresolved or ambiguous calls.

drag-lint ambiguous-calls [--qname <Foo.Bar>|--file <file>] --db PATH [--json] (resolver-coverage diagnostic: unresolved/ambiguous call sites)
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--file<file>
--dbPATH
--json

Described in ambiguous-calls.

ask

Ask one report question and print the answer as text.

drag-lint ask <question> --target <T> [--project <P.dproj> | --in <U.pas> | --db <idx>] [--to <B>] [--server-db <idx>]
FlagArgumentMeaningDefault
--target<T>
--project<P.dproj>
--in<U.pas>
--db<idx>
--to<B>
--server-db<idx>
--sql-db<idx>
--counterpart-db<idx>
--depthN
--capN
--surface-capN
--control<C>
--mode
--max-rowsN
--out-root<dir>
--pairs-file<f.json>
--allow-stale
--plain
--open
--resolve-only

Described in:

bench-context

Benchmarks the context command by building context bundles for a sample of symbols against a database.

drag-lint bench-context [--db <file.sqlite>] [--n N]
FlagArgumentMeaningDefault
--db<file.sqlite>
--nN

Described in bench-context.

butterfly

Composes a symbol's callers (upward wing) and callees (downward wing) into one combined chart in a single command.

drag-lint butterfly --qname <X> [--depth N] [--format dot|mermaid|text|json] [--output F] --db PATH [--db ...] (composes callers (upward wing) + callees (downward wing) of X into one chart; default format dot)
FlagArgumentMeaningDefault
--qname<X>
--depthN
--format
--outputF
--dbPATH

Described in butterfly.

call-path

Finds the shortest resolved call path from one symbol to another.

drag-lint call-path --from <A> --to <B> [--max-depth N] --db PATH [--json] (shortest resolved call path A -> ... -> B; exit 1 = no path)
FlagArgumentMeaningDefault
--from<A>
--to<B>
--max-depthN
--dbPATH
--json

Described in call-path.

callgraph

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

drag-lint callgraph --qname <X> [--direction callers|callees] [--depth N] --db PATH [--json] (N-deep resolved call tree; cycle-guarded)
FlagArgumentMeaningDefault
--qname<X>
--direction
--depthN
--dbPATH
--json

Described in callgraph.

check-ast

Runs drag-lint's AST-level checks against a file.

drag-lint check-ast <file> [--db PATH] [--rule <id>] [--format text|json]
FlagArgumentMeaningDefault
--dbPATH
--rule<id>
--format

Described in Run AST Checks.

check-unit

The whole-unit form of the undeclared-identifier quick-fix: resolves every unresolved name in a unit at once and adds the units that declare them.

drag-lint check-unit <unit.pas> [--project <dproj>] [--platform win32|win64] [--shadow <dir>] [--resolve-uses] [--db PATH] [--format json|text]
FlagArgumentMeaningDefault
--project<dproj>
--platform
--shadow<dir>
--resolve-uses
--dbPATH
--format

Described in Add Missing Units to uses (whole unit).

compare

Reruns a saved or pasted report and shows before / delta / after.

drag-lint compare --old <report.txt|forms.csv|bundle dir> [--command "<id> -Target T -Project P ...>"] [--project <P.dproj>]
FlagArgumentMeaningDefault
--old<report.txt|forms.csv|bundle dir>
--command
--project<P.dproj>
--new<same kind>
--old-db<old.sqlite>
--db<new.sqlite>
--auto
--save
--snapshot-dir<dir>
--format
--output<file>
--open

Described in Compare a report with current code.

compile-check

Runs a compiler-backed check against a single Delphi project (.dproj) or source file (.pas) and reports the result.

drag-lint compile-check <target.dproj|.pas> [--project <X.dproj>] [--db PATH] [--format json|text] (no --db: caches only into the project's unique manifest owner, else reports uncached)
FlagArgumentMeaningDefault
--project<X.dproj>
--dbPATH
--format

Described in compile-check.

context

Returns a compact context bundle for a symbol -- its doc comment, class surface (signatures), the target's own body, and a capped list of callers.

drag-lint context --task "verb qname" [--db <file.sqlite>] [--format md|json|raw] [--no-docs] [--full-surface] (AI-ready symbol bundle: doc + class surface + the target body + capped callers. When the task phrase matches a dl:wiki topic ALIAS, up to 2 topics ride along as a "## Wiki" section -- suppressed by --no-docs. A qname that resolves to nothing now exits 1 and SAYS so)
FlagArgumentMeaningDefault
--task
--db<file.sqlite>
--format
--no-docs
--full-surface
--max-callersN
--contextN

Described in context.

convert-apply

Locates .dfm component instances that match a #convert rule from a conversion-rules file and rewrites all five surfaces: declaration retype, uses-add.

drag-lint convert-apply --unit <F.pas> [--unit <G.pas> ...] --rules <file> --db PATH [--db ...] [--only Name1,Name2,...] [--castlib <file>] [--apply] [--no-backup] [--no-warn-unlinked] [--no-reconcile-uses] [--no-reindex] [--format json|--json] (locates .dfm component instances matching a #convert rule and rewrites all 5 surfaces: declaration retype + uses-add + .dfm re-emit + property/event access-site rewrite + runtime-creator retype/TODO markers; without --apply this is DRY-RUN ONLY (preview, writes nothing); --apply writes for real with backups + a recovery.txt unless --no-backup; --format json emits schema apply/1 -- the six report surfaces plus a typed items[] carrying a machine-readable kind per line, so the conversion REMAINDER can be dispatched on instead of parsed out of prose, plus resolved_defaults[] (informational receipts, kept OUT of items[] because on a real form they run to thousands and would bury the remainder); --castlib names the .castlib whose enum blocks translate a #link value when the link carries a cast suffix; a source property some converted instance carries that no #link carries and no #ignore acknowledges is warned ONCE per (source type, property) as "dropped on N of M converted instance(s)" -- a minority count is the stronger signal -- and counted in json as unlinked_source_properties / unlinked_source_property_sites / unlinked[]; --no-warn-unlinked drops the warnings and keeps the count; the book's UNIT rules act on the unit too: #unuse Old removes it, #use New adds it to the implementation uses when absent from both clauses, #useswap Old -> New1[, New2] removes Old and adds each New once into the section Old was in (a unit that does not use Old gets no edit from the swap) -- a unit both added and removed is kept, an entry inside a {$IF...} region refuses the unit (exit 1, nothing written); with no sibling .dfm, no #convert block or no matching instance the unit rules run alone (component part skipped; a book with no unit rules still needs the .dfm, exit 1); json adds component_part, uses[] {action,unit,section,line,rule,reason}, uses_removed, uses_added; the To type's unit goes to the INTERFACE uses when the retyped field is declared in the interface, and is MOVED there from an implementation-only use (1.23.0);EVERY #convert block is validated and freshness-checked -- each #link/#default against its own From/To types, each #mapping against the blocks that #apply it -- with each path resolved segment by segment, no depth limit (a published leaf; each hop published, or public and class-typed; private never); a #convert type that resolves in no --db REFUSES the unit, dry run and --apply alike -- an index gap, not a rule error ('<Type> (line N) resolves in no --db -- index gap in the library or project index; reindex, or report it, before converting'); json classes_built counts the classes whose members were resolved; a #link/#default/#mapping path through a member that exists but is inaccessible is SKIPPED, never applied and never an error -- the unit converts the rest -- and reported as a 'line N: warning: ...' line (text: under Warnings; json: warnings[] strings, items[] kind rule-path-unreachable, and unreachable[] {line,path,member,visibility,class,reason,message}); an inherited/inline .dfm object of a From type whose declaring ancestor is not converted is SKIPPED, never converted, while the unit's own instances, code and unit rules convert (1.22.0) -- each reported as a 'line N: warning: ...' line (json: warnings[], items[] kind inherited-instance-skipped, and inherited[] {name,type,line,ancestor_unit,ancestor_state,reason,action}; ancestor_state unconverted|converted|mismatched|outside: the declaring ancestor -- the nearest ancestor class whose .dfm opens it with object -- still has the From type, already has the To type, has a third type, or is not determinable: in no --db, or an ancestor .dfm on the way is missing or binary, which stops the walk; --only filters inherited[] too); one whose declaring ancestor ALREADY has the To type is RETYPED (1.26.0, C8 N2): inherited X: TFrom -> inherited X: TTo, keyword kept, nested and inline-frame children too; the properties its block overrides convert per the book (what it does not stream it inherits: no default resolved, no #default written); its code access sites are rewritten as for an own instance and the To unit is added; every code access to a field a converted ancestor declares (bound by the resolver, any level up) is rewritten too, .dfm block or not (N2a) -- json inherited[].action retyped|code|skipped|unverified (code: line = its first .pas reference), a converted[] line and items[] kind inherited-instance-retyped, not a warning; --only filters both; info capability inherited_retype; a code-only use of an UNCONVERTED ancestor's field is listed as action skipped, ancestor_state unconverted, reason 'ancestor not converted' (1.26.7, capability inherited_code_unconverted); the book's #warn <FromPath> "<text>" fires once per converted instance whose SOURCE .dfm streams FromPath (<value>, <name>, {Prop} expanded) -- 'line N: warning: <inst>: <text>', items[] kind book-warning with value; #check-ref <ToPath> <Class>.<Prop>[, ...] warns when the converted ToPath value contains \ or : (ref-path-like) or no listed Class.Prop of any .dfm in the project index carries it (ref-dangling), and once per run ref-not-checked when the index holds no .dfm property facts; info capabilities book_warn, check_ref (1.26.5); every code rewrite is scoped to the instance's field (receiver bound to it, or unbound / bare / Self. in a routine of the .dfm root class with no same-named local); a site the index cannot vouch for is NOT rewritten and is reported ('access site <file>:<line> ... not verified against the index -- not rewritten', items[] kind access-site-unverified, json access_sites_unverified); a --db resolved before resolver 1.12.0 is REFUSED, dry run too, naming the index ... --resolve-only fix; a #link carrying a cast never rewrites a .pas access site (1.27.0, interim): the cast's pas template is a statement with no correct splice inside an expression, so each bound site is reported -- 'line N: #link To <- From : Cast -- access site <file>:<line> <inst>.<From> not rewritten: ... convert this access site by hand', items[] kind cast-not-applied with instance, file, line and value (the cast); no .pas edit, the .dfm half of the cast unchanged; kind cast-applied is retired; info capability cast_site_refusal; a VALUE cast -- a castlib block with 'value strip-db' (shipped: StripDB, #link TableName <- TableName : StripDB) -- removes one trailing .db, any case, from the linked string: in the .dfm of each converted instance, and in .pas assignments whose right-hand side is ONE string literal; any other assignment and every read get no edit and a warning (items[] value-cast-applied {old_value,value} / value-cast-check; text 'value casts: N value(s) changed ...'); an unknown value keyword fails the run; info capability value_cast_strip_db (1.27.0); json pas_uses[] (1.27.0, dry run and --apply; info capability pas_uses) lists what the .pas still uses that the map does not cover: one row per (instance, member) the code reaches through a converted instance -- the access-site rewrite's own bound sites -- and one per global (routine/const/var/type) from a unit the reconciliation removes: {instance,from_type,to_type,member,kind method|property|field|event|const|var|type|routine|enum-value,visibility,declaring_unit,declared_in,status mapped|cast-refused|same-name|unmapped|global-dangling,lines[],count,resolution resolved|ambiguous|class-not-found|member-not-found|kind-unknown,candidates[]}; the From class is resolved through the unit's scope (the unit itself, then the LAST uses entry declaring it, then the book's qualified #convert From, then a lone declarer) -- several declarers left over is resolution ambiguous with candidates[] units and empty kind/declarer, never a pick (1.28.2, info capability pas_uses_resolution); text prints 'pas uses: N unmapped, M global-dangling, K same-name, J mapped, C cast-refused' and one line per unmapped member; a DESCENDANT unit (a class descending from the unit's root class at any level, or a form hosting it inline) that still streams a converted instance in its .dfm or uses it in code is a WARNING, never a refusal (1.25.0): 'line N: warning: descendant <Unit> still streams <Name> as <TOld> -- convert it next (needs C8 N2)', N = the instance's object line in this .dfm (json: items[] kind descendant-not-converted, descendants[] {unit,name,type,line,reason}; line = the descendant .dfm block, else its first code reference; reason dfm|code|both; --only filters it; only descendants the --db index are seen); a plan the edit applier would refuse in part (overlapping delete ranges -- an engine defect) fails the WHOLE unit before anything is written, dry run too, and a write that fails part-way is ROLLED BACK byte-identical (exit 2, '-- rolled back, unit not changed'; a failed rollback names the files it could not restore) (1.25.1): exit 1, 'ERROR: refused N edit(s) to <file> -- overlapping delete ranges (an engine defect) -- unit not changed, nothing written', json ok=false with that error; a .dfm component nested in another converted one is spliced into its parent's re-emit, and --only naming the parent converts it too (json only_included[] {name,parent}, text '--only: <child> converts too -- nested in <parent>'); a collection property (FieldDefs = < item ... end>) whose item members the book links (#link X.Items.* <- X.Items.*, identity) is carried whole when the To type publishes X with the same collection type, else reported NOT carried with its item count and counted as dropped, #ignore X notwithstanding; a deliberate refusal writes nothing and prints one 'REFUSED: <reason>' line -- a uses entry to change inside a {$IF...} region; an instance whose indexed .dfm span no longer holds it (lines added or removed, a block shrunk onto a sibling's end, or the .dfm cut short: '<Name>: index is stale for this .dfm -- reindex'); a #unuse / #useswap removing the unit that declares the From type of an instance left unconverted (skipped, inherited/inline, or excluded by --only) is refused too ('<rule> would leave <N> unconverted instance(s) of <Type> -- unit not changed') -- EXCEPT that with --only, when every such instance is one --only left out, the removal is SKIPPED (1.23.0: unit kept; json uses[] action skipped with a reason, a 'line N: warning:' line, items[] kind unit-rule-skipped; info capability only_skips_unit_rules); USES RECONCILIATION (1.27.0, C9, default on; --no-reconcile-uses = the 1.26.6 rules above, exactly): the converted .pas/.dfm are RE-INDEXED IN MEMORY (the indexer's own extractor, no DB written, so the dry run shows the --apply plan) and every #unuse / #useswap Old is a WATCH LIST -- the unit is KEPT while a component the converted .dfm still streams has a class declared in it (an unconverted instance, a second component type of that unit, an inherited instance the ancestor has not converted: R26's refusal becomes this, the --only skipped row is unchanged), REMOVED when only .pas code needs it (its dangling references named, the compile errors are the signal), KEPT when no --db indexes it; presence is scope-alias aware (#unuse DBTables matches Bde.DBTables, #use DB is satisfied by Data.DB); a bare name the conversion INTRODUCES into the .pas gets its declaring unit added -- interface uses when referenced above implementation -- and a name (or To type) two units declare is REPORTED, never picked (add #use <unit> to choose); a To-type tie the book's #use (or a uses entry of the unit) settles takes that unit, into the INTERFACE uses when the retyped field is declared there, or MOVED there (C9 A8-1); the C13 move is a row; every unit the #convert surface adds (a To type's unit, a #convert header's trailing unit) is an add row too (rule #convert, source rule, counted by uses_added; none when already present); json: uses[] action remove|add|skipped|kept|moved with source rule|reconcile|convert and needed_by[] {name,line,section}, uses_kept, uses_moved, uses_unresolved[] {name,line,section,reason ambiguous|not-found,candidates[] {unit,db}}, uses_reconcile on|off|degraded, items[] kinds unit-rule-kept, unit-rule-dangling, unit-rule-unverified, uses-unit-ambiguous (all warnings); after --apply the unit's OWN project DB -- the one --db that indexes it, a project index holding one .dproj/.dpr -- is refreshed with 'index --project <it> --db <it>' in a child process (json uses_reindex {status done|skipped|failed|dry-run|off,db,project,ms,reason}; a child still running after 10 minutes is terminated: failed; --no-reindex skips it; no other DB is ever written); info capability uses_reconcile; inside a #convert block '#migrate Old -> New' renames the member at every bound .pas access site of the block's converted instances (methods, events, properties; json items[] migrate-applied) and '#migrate Old -> DL_NONE' wraps each site, inst.Old -> DL_NONE(inst.Old), a deliberate break that does not compile until converted by hand (items[] deliberate-break, field todos); both make pas_uses[] status mapped; a with block, an unverified receiver, a scoped / template / uses-unit form or a member a #link already converts is never rewritten (items[] migrate-check); info capability migrate_members (C18 slice 1); --only names match case-insensitively; a name matching no #convert instance is ignored, never an error, and reported (json only_matched[] / only_unmatched[], always present; text '--only: no #convert instance named X (ignored)'); --unit may repeat (1.23.0): every unit runs in ONE process sharing one rule-book validation and one member cache -- text: one '=== unit i of N: <path> ===' section per unit, then 'batch: N unit(s) -- a ok, b refused, c failed; classes_built K; exit E'; json: ONE apply-batch/1 document {mode,rules_file,units_count,ok,exit_code,ok_count,refused_count,failed_count,classes_built (the run total),units[]: one apply/1 per unit, each equal to that unit's single run -- its classes_built is the unit's own}; under --apply a file a unit cannot write fails that unit before anything is written (exit 2); a unit's refusal or failure never stops the others; exit = the worst unit's; info capability batch_units; json has ok=false, refused=true (a JSON bool) and reason = that text -- every other outcome, success or failure, has refused=false and reason '')
FlagArgumentMeaningDefault
--unit<F.pas>
--rules<file>
--dbPATH
--only
--castlib<file>
--apply
--no-backup
--no-warn-unlinked
--no-reconcile-uses
--no-reindex
--format
--json

Described in:

convert-scaffold

Auto-generates a valid conversion-rules file from the real property trees of a from-type and a to-type.

drag-lint convert-scaffold --from <FromType> --to <ToType> [--output <file>] [--surface dfm|pas] [--depth N] [--rules <file>] [--progress-interval S] --db PATH [--db ...] (auto-generate a VALID conversion-rules file from the real F/T property trees, expanded to --depth N, else the --rules book's #depth N, else 5 (a bad value exits 2): concrete #link where 1 source matches by leaf-name+type, ??? for ambiguities, DROPPED notes for orphaned F props; --surface picks the TO-side target bar, default dfm=published-properties-only, pas=published+public incl. public fields; is_writable=false targets are never auto-linked on either surface; --progress-interval S: see PROGRESS below)
FlagArgumentMeaningDefault
--from<FromType>
--to<ToType>
--output<file>
--surface
--depthN
--rules<file>
--progress-intervalS
--dbPATH

Described in convert-scaffold.

convert-validate

Parses and validates a conversion-rules file (a reFind-superset DSL), checking its #link/#default paths against the real property trees.

drag-lint convert-validate --rules <file> [--from <FromType>] [--to <ToType>] [--print-parsed] [--db PATH ...] (parse+validate a reFind-superset conversion-rules DSL; checks #link/#default paths against the real --from/--to members, segment by segment with no depth limit (a published leaf; each hop published, or public and class-typed; private never) -- lazily, per class, no tree is built, so --depth and the book's #depth are ignored here (and by the hidden convert-reemit), though a bad #depth (not 1..10, or a second one) is a line N error, and so is a From-only header ('#convert TFoo -> ' or '#convert TFoo': '#convert TFoo has no To type'; '#useswap X -> ': '#useswap X has no replacement unit'); and a #link glyph expression (<FromPath> G[I/N], stitched G[1/6]G[2/6], per-N alternatives split by commas, G[count]) for syntax, I in 1..N and one alternative per N, naming the column; 'line N: warning:' lines (e.g. a straight NumGlyphs carry beside a G-link) never change the exit code; a path whose members all EXIST but one is inaccessible (private anywhere, protected anywhere, a public leaf) is a warning on stdout, not an error: 'line N: warning: <path>: <Member> is <visibility> in <Class>; never applied unless a descendant class changes its visibility' -- only a segment naming no member is "not found" (exit 1); without BOTH --from and --to the book is only PARSED -- no path is checked -- and a 'NOTE:' line on stderr says so; a #warn path or {Prop} placeholder, or a #check-ref ToPath, naming no member is a line N error, and so is a malformed #warn / #check-ref (1.26.5); no JSON mode)
FlagArgumentMeaningDefault
--rules<file>
--from<FromType>
--to<ToType>
--print-parsed
--dbPATH

Described in convert-validate.

create-enum-helper

Generates a Byte-family record helper (ToByte/FromByte/ToInteger/ FromInteger/ToString/FromString) for an enum type.

drag-lint create-enum-helper --qname <TEnum> [--apply|--json|--no-backup] [--methods <csv>] [--tostring rtti|case] [--db PATH] - generate a Byte-family record helper for an enum
FlagArgumentMeaningDefault
--qname<TEnum>
--apply
--json
--no-backup
--methods<csv>
--tostring
--dbPATH

Described in:

cycles

Finds uses cycles among indexed units and, on request, proposes a followable refactoring plan to break them.

drag-lint cycles --db <file.sqlite> [--edges] [--causes] [--plan] [--format json|text] (circular unit deps; --plan = mechanical refactoring playbook: moves, uses edits, new-unit text, checklist + predicted output)
FlagArgumentMeaningDefault
--db<file.sqlite>
--edges
--causes
--plan
--format
--project<X.dproj>
--fix
--cycle<n>
--unit<stem>
--part
--apply
--no-backup
--no-reindex
--no-compile
--shadow-out<dir>
--library-db<lib.sqlite>
--platform
--rules-dir<dir>

Described in:

deps-report

Produces a third-party dependency rollup from an index: which external units/libraries an indexed codebase depends on.

drag-lint deps-report --db <file.sqlite> [--db ...] [--depth N] [--edges] [--all-sources] [--name <pat>] [--format text|json|csv] [--output <file>] (third-party dependency rollup)
FlagArgumentMeaningDefault
--db<file.sqlite>
--depthN
--edges
--all-sources
--name<pat>
--format
--output<file>

Described in deps-report.

diff

Compares two index databases and reports what changed between them -- for example an index snapshot taken before and after a refactor.

drag-lint diff --db <old.sqlite> --db <new.sqlite> [--json]
FlagArgumentMeaningDefault
--db<old.sqlite>
--json

Described in diff.

doc-drift

Diagnostic that computes deterministic doc-vs-code drift findings for one symbol.

drag-lint doc-drift --qname X --db PATH [--json] (diagnostic: deterministic doc-vs-code drift findings for one symbol)
FlagArgumentMeaningDefault
--qnameX
--dbPATH
--json

Described in doc-drift.

doc-forget

Reap or rename the project tags on inbound documentation facts; a dry run unless told to apply.

drag-lint doc-forget --scope <file.pas|dir> (--project <Tag> [--rename <Tag>=<New>] | --untagged | --list-tags) [--apply|--no-backup] - reap project tags on inbound doc facts
FlagArgumentMeaningDefault
--scope<file.pas|dir>
--project<Tag>
--rename<Tag>
--untagged
--list-tags
--apply
--no-backup

Described in doc-forget.

document

Writes DocInsight documentation into every public declaration a project owns.

drag-lint document --qname <Foo.TBar.Baz> [--apply|--json|--no-backup|--migrate-pure] [--db PATH] - generate/repair a managed DocInsight comment
FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--apply
--json
--no-backup
--migrate-pure
--dbPATH

Described in:

document-all

Documents every public declaration in every indexed unit, with no project scope.

drag-lint document-all [--stubs|--apply|--json|--no-backup|--include-accessors|--migrate-pure] [--db PATH] - document every public decl in every indexed unit (no project scope)
FlagArgumentMeaningDefault
--stubs
--apply
--json
--no-backup
--include-accessors
--migrate-pure
--dbPATH

Described in document-all.

dump-call-edges

Diagnostic that dumps every resolved call edge in the index as refid|targetqname|confidence rows.

drag-lint dump-call-edges --db PATH (diagnostic: resolved call edges: ref_id|target_qname|confidence)
FlagArgumentMeaningDefault
--dbPATH

Described in dump-call-edges.

dump-refs

Diagnostic that dumps every ref in a file together with its enclosingsymbolid attribution.

drag-lint dump-refs <file> --db PATH (diagnostic: refs + enclosing_symbol_id attribution)
FlagArgumentMeaningDefault
--dbPATH

Described in dump-refs.

exceptions-sync

Declare one exception class per distinct raise Exception.Create message, then rewrite the raise sites.

drag-lint exceptions-sync [--db <file.sqlite>] [--config <lint.json>] [--apply] [--json] (materialise the project's derived exception classes)
FlagArgumentMeaningDefault
--db<file.sqlite>
--config<lint.json>
--apply
--json

Described in exceptions-sync.

export

Uses export enums with --format delphi-const to dump indexed enum types as Delphi const declarations.

drag-lint export enums --db <file.sqlite> [--format firebird-sql|csv|json|delphi-const] [--output <file>]
drag-lint export obsidian --db <file.sqlite> --output-dir <dir> [--open]
FlagArgumentMeaningDefault
--db<file.sqlite>
--format
--output<file>
--output-dir<dir>
--open

Described in:

extract-method

Pulls a run of statements out of a routine into a new method.

drag-lint extract-method --file <F> --from-line <L1> --to-line <L2> --name <N> [--json|--apply|--no-backup] - pull a statement run into a new method
FlagArgumentMeaningDefault
--file<F>
--from-line<L1>
--to-line<L2>
--name<N>
--json
--apply
--no-backup

Described in extract-method.

fb-snapshot

Connects to a Firebird database and captures a snapshot into a sqlite index.

drag-lint fb-snapshot --connection "Database=...;User=...;Password=...;DriverID=FB" --db <sql.sqlite>
FlagArgumentMeaningDefault
--connection
--db<sql.sqlite>

Described in fb-snapshot.

find-callees

Lists the resolved outgoing calls of one routine.

drag-lint find-callees --qname <Foo.Bar> --db PATH [--json] (resolved outgoing calls of routine X)
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--dbPATH
--json

Described in find-callees.

find-deadcode

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

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

Described in Find Dead Code.

find-unit

Finds which indexed unit declares a symbol, and adds that unit to a file's uses clause.

drag-lint find-unit --name <Symbol> --in <file> [--json|--apply|--no-backup] --db <db> - add the declaring unit to uses
FlagArgumentMeaningDefault
--name<Symbol>
--in<file>
--json
--apply
--no-backup
--db<db>

Described in find-unit.

format

Runs YADF formatting across a project's files, with indexing involved as part of the same action.

drag-lint format <file> [--yadf-path PATH] [--dry-run] [--diff] (rewrites the file IN PLACE via YADF; --dry-run resolves + version-checks and writes nothing, --diff formats a copy and prints the diff. Refuses YADF older than 1.0.6.6 (exit 4) and restores the file if formatting changes what the unit declares (exit 5))
FlagArgumentMeaningDefault
--yadf-pathPATH
--dry-run
--diff

Described in:

forms-csv

A CSV of a project's forms, one row per form, telling a tester how to reach each one from the main form.

drag-lint forms-csv --project <X.dproj> --db <file.sqlite> [--output <f.csv>] [--root <TfrmMAIN>] (tester CSV, one row per form: menu/ribbon/tab path, control, handler, modal, confidence)
FlagArgumentMeaningDefault
--project<X.dproj>
--db<file.sqlite>
--output<f.csv>
--root<TfrmMAIN>

Described in Forms for testers (CSV).

generate-docs

Uses generate-docs to produce a doc-comment stub for one qualified symbol.

drag-lint generate-docs --qname <Foo.TBar.Baz> [--format xmldoc|pasdoc] [--db PATH]
FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--format
--dbPATH

Described in Doc Comment Stub (symbol).

generate-test

Uses generate-test to produce a unit-test skeleton for one qualified symbol.

drag-lint generate-test --qname <Foo.TBar.Baz> [--framework dunitx|dunit] [--db PATH]
FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--framework
--dbPATH

Described in Unit Test Stub (symbol).

ghost-check

Compiles a project with one or more units' content temporarily replaced by their unsaved editor buffers, then restores the original files unchanged.

drag-lint ghost-check <dproj> ( --unit <real.pas> --buffer <buf> | --overlays <manifest> ) [--platform win32|win64] [--in-place] [--format json|text]
FlagArgumentMeaningDefault
--unit<real.pas>
--buffer<buf>
--overlays<manifest>
--platform
--in-place
--format

Described in ghost-check.

ghost-recover

Scans a project's hidden D-RAG folder for recovery journals left behind when a ghost-check overlay was interrupted by a crash.

drag-lint ghost-recover <dproj> (restore any file left overlaid by an INTERRUPTED ghost-check)

Described in ghost-recover.

glyph-vacuum

Measure every streamed glyph or picture under a tree before writing a glyph rule.

drag-lint glyph-vacuum --root DIR [--root DIR ...] --output DIR [--append] [--db PATH ...] (measure every streamed graphic under the roots before writing a glyph rule: walks .dfm/.fmx, decodes each Picture.Data/Glyph.Data blob (wrapper class, format, width/height/bpp/palette), pairs it with its count property (NumGlyphs and kin), writes instances.tsv + classes.tsv + skipped.tsv + images\ + gallery.html into --output; --append merges into an existing --output; --db only qualifies class_unit / declared count default / runtime_refs)
FlagArgumentMeaningDefault
--rootDIR
--outputDIR
--append
--dbPATH

Described in glyph-vacuum.

graph

Uses graph to export the indexed call/reference graph in DOT format, either whole or rooted at a name substring.

drag-lint graph --db <file.sqlite> [--format dot|mermaid] [--name <root-substr>] [--output <file>]
FlagArgumentMeaningDefault
--db<file.sqlite>
--format
--name<root-substr>
--output<file>

Described in Export Graph (DOT).

helpers-of

Lists record/class helper edges targeting a given type, anywhere in the index.

drag-lint helpers-of <T> [--json] --db <db> - list record/class helper edges targeting type T anywhere in the index
FlagArgumentMeaningDefault
--json
--db<db>

Described in helpers-of.

hover

Shows a hover card for the symbol under the editor caret: signature, documentation, and callers.

drag-lint hover --qname <Foo.Bar> [--db <file.sqlite>] [--format plain|md|json]
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--db<file.sqlite>
--format

Described in Hover at Cursor.

ide-release

Asks a running drag-lint Delphi IDE plugin not to respawn its drag-lint.exe child processes for a while -- and to drop the running one on its next request.

drag-lint ide-release [--seconds N] [--resume] [--status] [--json] (writes a hold sentinel: a running Delphi IDE plugin will not respawn drag-lint.exe while it lasts and stops its LSP child on the next request that wants it, so the engine binary can be rebuilt while the IDE stays open; default 120s, --resume clears it early. Frees nothing by itself -- build\stage-engine.ps1 kills the running holder and retries. The plugin job queue also DEFERS its heavy jobs for the duration rather than starting them)
FlagArgumentMeaningDefault
--secondsN
--resume
--status
--json

Described in ide-release.

impact

Reports what would be affected if a chosen symbol changes -- the set of code to retest.

drag-lint impact --qname <Foo.Bar> [--db <file.sqlite>] [--depth N] [--format text|json]
FlagArgumentMeaningDefault
--qname<Foo.Bar>
--db<file.sqlite>
--depthN
--format

Described in Impact / Blast Radius (symbol).

import-log

Parses an external dcc or msbuild build log and folds its errors and warnings into drag-lint's stored findings.

drag-lint import-log <logfile> --db <file.sqlite> (parse dcc/msbuild log)
FlagArgumentMeaningDefault
--db<file.sqlite>

Described in Import Build Log.

index

Writes DocInsight documentation into every public declaration a project owns.

drag-lint index <path> [--db <file.sqlite>] [--watch [--interval N]] [--library-db <lib.sqlite> ...]
FlagArgumentMeaningDefault
--db<file.sqlite>
--watch
--intervalN
--library-db<lib.sqlite>consult another index for calls THIS one cannot resolve.
--max-file-kbN
--no-use-ignore
--no-sql-ms
--deep
--shallow
--exclude-under
--include-only

Described in:

info

The plugin's status window -- versions, connection health, and which indexes are actually in use.

drag-lint info [--json] [--db <file.sqlite>]... (engine self-info: product/extractor/resolver versions, build date, MIT, tree-sitter + capabilities; read-only)
FlagArgumentMeaningDefault
--json
--db<file.sqlite>

Described in:

library-drift

Flags registered library roots that have source on disk but nothing in the index.

drag-lint library-drift [--platform <p>] [--config <path>] [--json] - registry library roots that have source on disk but none in the index (exit 2 if drift; roots the section exclude prunes are listed as excluded, not counted)
FlagArgumentMeaningDefault
--platform<p>
--config<path>
--json

Described in Library Drift Check.

Links a project's code index to a SQL index so ORM-style relationships between Delphi symbols and SQL objects can be resolved across both.

drag-lint link-orm --db <projDb.sqlite> --db <sqlDb.sqlite>
FlagArgumentMeaningDefault
--db<projDb.sqlite>

Described in link-orm.

lint

Puts every lint finding for the current unit onto the clipboard, starting from the Structure form.

drag-lint lint <path> [--rule <id>] [--disable id1,id2] [--rules-dir <dir>] [--json] [--no-preprocess] [--library-db <lib.sqlite>]
FlagArgumentMeaningDefault
--rule<id>
--disable
--rules-dir<dir>
--json
--no-preprocess
--library-db<lib.sqlite>
--db<index.sqlite>
--project-rules
--stand-in-for<realpath>

Described in:

lint-all

Applies autofixes for every fixable finding across the whole project, starting from the Structure form.

drag-lint lint-all [--db <file.sqlite>] [--project <.dproj>] [--rule <id>] [--disable id,...] [--output <report.txt>] [--json] [--quiet] [--lint-third-party] [--no-preprocess]
FlagArgumentMeaningDefault
--db<file.sqlite>
--project<.dproj>
--rule<id>
--disable
--output<report.txt>
--json
--quietsuppress per-file progress lines written to stderr
--lint-third-party
--no-preprocess
--fix
--fix-naming
--apply

Described in:

lint-project

Runs project-scoped structural lint rules against an index -- checks such as god-class, unused-public-symbol.

drag-lint lint-project --db <file.sqlite> [--rule god-class|unused-public-symbol|interface-reference-cycle|layering-violation|unused-private-member|unused-unit-in-uses|circular-uses|repeated-type-switch|global-only-uses-edge|duplicate-global-decl|uses-global-census|discarded-effect-free-result|query-name-with-effect|assert-with-side-effect] [--layers <f.json>] [--json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--rule
--layers<f.json>
--json

Described in lint-project.

lint-tree

Answers one question lint-all cannot: does an interface edit to this unit reach any dependent?

drag-lint lint-tree --unit <B.pas> --db <file.sqlite> [--buffer <buf>] [--project <.dproj>]
FlagArgumentMeaningDefault
--unit<B.pas>
--db<file.sqlite>
--buffer<buf>
--project<.dproj>
--baseline<f.json>
--write-baseline<f.json>
--platform
--with-rules
--compile
--format

Described in lint-tree.

lsp

Starts the LSP (Language Server Protocol) stdio server.

drag-lint lsp --db <file.sqlite> (LSP stdio server) [--stdio] [--parent-pid <n>] [--clientProcessId <n>]
FlagArgumentMeaningDefault
--db<file.sqlite>
--stdio
--clientProcessId
--proxy
--delphi-lsp<path>
--trace<file>

Described in lsp.

mcp-config

Adds drag-lint serve to Claude Code and VS Code MCP config: merged, backed up, idempotent, removable.

drag-lint mcp-config (--claude-code | --vscode | --all) [--remove] [--dry-run] [--name <n>] [--db <index>] [--engine <exe>] [--config-path <file>] [--json]
FlagArgumentMeaningDefault
--claude-code
--vscode
--all
--remove
--dry-run
--name<n>
--db<index>
--engine<exe>
--config-path<file>
--json
--home-dir
--appdata-dir

Described in Register the MCP server (Claude Code, VS Code).

migrate-dbs

Moves project index databases into each project's own D-RAG folder, matching the current index layout.

drag-lint migrate-dbs [--config <drag-lint.json>] [--apply] move project indexes into each project's _D-RAG folder
FlagArgumentMeaningDefault
--config<drag-lint.json>
--apply

Described in migrate-dbs.

outline

Prints the file-scoped symbol outline for one Pascal unit.

drag-lint outline --file <path.pas> [--db <path>] [--format text|json]
FlagArgumentMeaningDefault
--file<path.pas>
--db<path>
--format

Described in outline.

pp-profile

Diagnostic that prints the resolved preprocessor define profile for a project, one symbol per line.

drag-lint pp-profile [--dproj PATH] [--platform win32|win64] [--config Release|Debug] (diagnostic: print the resolved define profile, one symbol per line)
FlagArgumentMeaningDefault
--dprojPATH
--platform
--config

Described in pp-profile.

preprocess-file

Diagnostic that prints a file's {$IFDEF}-resolved source to stdout under a given define set.

drag-lint preprocess-file --file PATH [--define SYM]... [--numeric K=V]... [--include-mode off|defines-only] [--no-near-search] [--tolerances] (diagnostic: print {$IFDEF}-resolved source to stdout)
FlagArgumentMeaningDefault
--filePATH
--defineSYM
--numericK
--include-mode
--no-near-search
--tolerances

Described in preprocess-file.

project-facts

Report what the build does: defines that are on and what sets each, imports, output paths and packages.

drag-lint project-facts --dproj PATH [--platform win32|win64] [--config Release|Debug] [--db PATH] [--json] (what the BUILD does: defines ON and what sets each, <Import>s, output paths, packages; flags a post-processor define with no build step imported)
FlagArgumentMeaningDefault
--dprojPATH
--platform
--config
--dbPATH
--json

Described in project-facts.

proptree

Recursive deep-property enumerator for a class: flattens its own and inherited properties into dotted paths, recursing into class-typed properties.

drag-lint proptree --qname <X> [--depth N] [--rules <file>] [--progress-interval S] [--no-to-persistent] [--refs-as-leaves] [--no-write-back] [--min-visibility published|public] [--format text|json] [--json] --db PATH [--db ...] (recursive deep-property enumerator: flattened dotted paths of a class's own+inherited properties, recursing into class-typed types; depth = --depth N (an integer >= 1), else the --rules book's #depth N (1..10), else 5 -- a K-segment path needs depth >= K-1; a bad --depth or #depth exits 2; --refs-as-leaves leaves TComponent-typed properties unexpanded (references, not owned sub-objects); types recovered by the ancestry-bridge are memoized back into the index automatically -- --no-write-back forces a read-only, non-mutating query; --min-visibility filters emitted leaves by effective visibility, default = all, schema proptree/2; --progress-interval S: see PROGRESS below)
FlagArgumentMeaningDefault
--qname<X>
--depthN
--rules<file>
--progress-intervalS
--no-to-persistent
--refs-as-leaves
--no-write-back
--min-visibility
--format
--json
--dbPATH

Described in proptree.

protocol

Registers draglint:// so a chart row opens its line in RAD Studio; a GUI helper exe, no PowerShell.

drag-lint protocol register [--handler <drag-lint-open.exe>] [--dry-run] [--force] (HKCU\Software\Classes\draglint -> the handler; --force accepts a *-wt\ path or replaces a foreign registration)
FlagArgumentMeaningDefault
--handler<drag-lint-open.exe>
--dry-run
--force

Described in Click-to-source: the draglint:// handler.

purge-locals

A size escape hatch for an index database that has grown too large: it drops local-variable and parameter symbols and runs VACUUM to reclaim space.

drag-lint purge-locals --db PATH [--json] (size escape hatch: drop skLocalVar/skParam symbols + VACUUM; call graph unchanged; re-inflated on next index)
FlagArgumentMeaningDefault
--dbPATH
--json

Described in purge-locals.

query

Uses query hints to surface compiler hint/warning findings that have been imported into the index, filtered by code or severity.

drag-lint query --name <symbol-name> [--db ...] [--json] [--case-sensitive] [--exact]
drag-lint query hints --db <file.sqlite> [--name <code>] [--rule <severity>]
drag-lint query find [--doc-tag X | --doc-contains Y | --decl-contains Z | --no-docs] [--kind K] [--name N] [--unit U] [--public] [--db ...]
drag-lint query ancestors --name <type> [--of <ancestor>] [--db ...] [--json] (transitive class/interface hierarchy)
drag-lint query descendants --of <ancestor> [--db ...] [--json] (the REVERSE of ancestors: every CLASS descending from <ancestor>, across all scanned DBs. Derived INTERFACES are deliberately excluded -- this backs the conversion editor's class pickers. exit 1 = no such ancestor)
drag-lint query find-callers --name <callee-name> [--context N] [--resolved] [--db ...] [--json]
drag-lint query type-usage --in <file.pas> (--names A,B,C | --names-file <f>) [--db ...] [--json]
drag-lint query typecat --name <type> [--db ...] [--json] (resolve type category: float/string/class/interface/...)
drag-lint query unit-usage --unit <UnitName> [--in <file.pas>] [--db ...] [--json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--name<code>
--rule<severity>
--doc-tagX
--doc-containsY
--decl-containsZ
--no-docs
--kindK
--unitU
--public
--of<ancestor>
--json
--contextN
--resolvedprecise callers via resolved call_edges (grouped by target, certain|ambiguous); a PROPERTY/FIELD name lists its bound accesses [certain, read|write]; an ENUM VALUE name lists each bound read [certain, read] (resolver 1.6.0-alpha)
--case-sensitive
--exact
--in<file.pas>
--namesA
--names-file<f>

Described in:

reconcile-project

Compares a project file's declared member list against what is on disk and in the compile closure.

drag-lint reconcile-project <App.dpr|.dproj> [--apply] [--only <unit,...>] [--db <db>] [--full] [--json] [--config <path>] - sync project member list; flag stale used units. --only restricts MISSING (and therefore --apply) to a reviewed selection, so a dry run with --only previews exactly what --apply would write. --json carries `applied` (the OUTCOME, false when --apply had nothing to write) plus `backups` and `edited` when --apply is passed
FlagArgumentMeaningDefault
--apply
--only<unit,...>
--db<db>
--full
--json
--config<path>

Described in Reconcile Project Members (.dpr/.dproj).

refresh-findings

Recompiles a project's stale units and refreshes its stored compiler findings, forcing a full build rather than the default stale-count threshold.

drag-lint refresh-findings --project <X.dproj> [--db <db>] [--full] [--json] (recompile stale units + refresh compiler_findings; >=2 stale -> full build; no --db = the project's own DB)
FlagArgumentMeaningDefault
--project<X.dproj>
--db<db>
--full
--json

Described in Full Compile Sweep.

register-project

Add a new project to the manifest so index --all and the IDE can see it.

drag-lint register-project <file.dproj> [--name <Section>] [--apply] [--json] (add a NEW project to the manifest so index --all and the IDE can see it; dry-run without --apply)
FlagArgumentMeaningDefault
--name<Section>
--apply
--json

Described in register-project.

rename

Renames a symbol across the whole indexed project.

drag-lint rename --kind symbol --name <QName> --to <New> [--json|--apply|--no-backup] --db <db> - cross-unit rename
FlagArgumentMeaningDefault
--kind
--name<QName>
--to<New>
--json
--apply
--no-backup
--db<db>

Described in Rename Symbol.

resolve-dbs

Prints which database(s) drag-lint would actually use for a given project, file, or platform, without running a real query.

drag-lint resolve-dbs [--platform win32|win64] [--config <path>] [--json] (print the consumer DB list query/lsp/serve would use)
FlagArgumentMeaningDefault
--platform
--config<path>
--json

Described in Show Resolved DBs (debug).

reverse-calltree

Shows callers and callees of one symbol together in a single "butterfly" view.

drag-lint reverse-calltree --qname <X> [--direction callers|callees] [--depth N] [--format text|json|dot|mermaid] [--json] --db PATH [--db ...] (N-deep call tree; callers=who calls X (default), callees=what X calls; cycle-guarded)
FlagArgumentMeaningDefault
--qname<X>
--direction
--depthN
--format
--json
--dbPATH

Described in:

rules

Shows the catalog of lint rules in the context of a specific project.

drag-lint rules [--json] [--category <name>] [--rules-dir <dir>] - list every lint rule (catalog)
FlagArgumentMeaningDefault
--json
--category<name>
--rules-dir<dir>

Described in:

safe-delete

Deletes a symbol if and only if it has zero references in the index.

drag-lint safe-delete --name <QName> [--json|--apply|--no-backup] --db <db> - delete a symbol iff it has zero references
FlagArgumentMeaningDefault
--name<QName>
--json
--apply
--no-backup
--db<db>

Described in safe-delete.

schema

Prints the live schema of an index database: schemaversion, every table and column, and row counts.

drag-lint schema --db <file.sqlite> [--format text|json] [--output <file>] (self-documenting LIVE index schema: schema_version + tables + columns + row counts, read-only)
FlagArgumentMeaningDefault
--db<file.sqlite>
--format
--output<file>

Described in schema.

serve

Starts the MCP (Model Context Protocol) stdio server, for AI clients such as Claude or Cursor to query a drag-lint index.

drag-lint serve --db <file.sqlite> (MCP stdio server)
FlagArgumentMeaningDefault
--db<file.sqlite>

Described in serve.

shared-unit

Reads or extends the dl:shared marker on a unit, recording which projects share it.

drag-lint shared-unit --in <file.pas> [--add-project <name>] [--apply] [--json] (read/extend the dl:shared marker; dry-run without --apply)
FlagArgumentMeaningDefault
--in<file.pas>
--add-project<name>
--apply
--json

Described in shared-unit.

shutdown

Ask running lsp engines to close their indexes and stand down, so an index can be rebuilt without killing them.

drag-lint shutdown [--db <file.sqlite>]... [--wait <sec>] [--dry-run] [--all] [--force] (ask running `lsp` engines to stand down: close every store, exit 0)
FlagArgumentMeaningDefault
--db<file.sqlite>
--wait<sec>
--dry-run
--all
--force

Described in shutdown.

slice

Shows the slice of code relevant to one symbol: its declaration, body, and immediate context.

drag-lint slice --qname <Foo.TBar> [--db <file.sqlite>] [--format text|json]
FlagArgumentMeaningDefault
--qname<Foo.TBar>
--db<file.sqlite>
--format

Described in Symbol Slice.

sql

Runs one read-only SQL statement against an index database and prints the result set.

drag-lint sql --query "SELECT ..." | --file <q.sql> --db <file.sqlite> [--format text|json] [--json] [--limit N] [--timeout-ms N] [--output <file>] (guarded READ-ONLY SQL over the index: exactly one statement, an sqlite3 authorizer refuses ATTACH/PRAGMA/DDL/writes, row cap 200 and time cap 10000 ms; ask `schema --format json` for the columns)
FlagArgumentMeaningDefault
--query
--file<q.sql>
--db<file.sqlite>
--format
--json
--limitN
--timeout-msN
--output<file>

Described in sql.

surface

Shows the public surface of a class: its members and signatures, without the method bodies.

drag-lint surface --qname <Foo.TBar> [--db <file.sqlite>] [--include-impl] [--all-visibility] [--format text|json]
FlagArgumentMeaningDefault
--qname<Foo.TBar>
--db<file.sqlite>
--include-impl
--all-visibility
--format

Described in Class Surface.

todos

Scans source for TODO/FIXME/HACK/XXX/REVIEW/NOTE markers.

drag-lint todos [<path>] (TODO/FIXME/HACK/XXX/REVIEW/NOTE scanner; [--json])

Described in Scan TODOs / FIXMEs.

top

Ranks indexed symbols by fan-in -- how many places reference them.

drag-lint top --db <file.sqlite> [--by fanin] [--limit N] [--json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--by
--limitN
--json

Described in Top Symbols (fan-in).

typeat

Resolves the static type of the expression under the editor caret.

drag-lint typeat <file>:<line>:<col> [--db <file.sqlite>] [--format text|json]
FlagArgumentMeaningDefault
--db<file.sqlite>
--format

Described in Type at Cursor.

usages

Lists references to the symbol represented by a Structure-tree node.

drag-lint usages --name <X> [--width narrow|wide|very-wide] [--db <path>] [--depth N] [--format json|--json]
FlagArgumentMeaningDefault
--name<X>
--width
--db<path>
--depthN
--format
--json

Described in:

uses-audit

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

drag-lint uses-audit <unit.pas> --db <file.sqlite> [--format json|text] (interface->impl moves + unused units)
FlagArgumentMeaningDefault
--db<file.sqlite>
--format

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

uses-fix

Applies the fix for the single lint finding on a Structure-tree node; an unused unit is removed or moved to implementation by compiling.

drag-lint uses-fix <unit.pas> --project <dproj> --db <file.sqlite> [--platform win32|win64] [--apply] [--remove-unused] [--only <unit,...>] [--format json|text] (compiler-verified uses cleanup; --format json lists every candidate with a status -- verified | skipped | deselected -- and --only restricts which are compiled and written, so a reviewed partial apply is expressible; a unit --only names that is in the uses clause but in no project index -- an RTL/VCL/library unit -- is decided by compiling too: removed when it has no initialization section (with --remove-unused), else moved to the implementation section, else skipped)
FlagArgumentMeaningDefault
--project<dproj>
--db<file.sqlite>
--platform
--apply
--remove-unused
--only<unit,...>
--format

Described in:

uses-report

Exports the project's unit-dependency data as a CSV file.

drag-lint uses-report --output <out.csv> [--db ...] [--depth N] [--include-external] [--all-sources] [--name <pattern>] (--name is a substring on the unit stem; one that matches NO source unit exits 2 with an ERROR and writes nothing, like outline)
FlagArgumentMeaningDefault
--output<out.csv>
--db
--depthN
--include-external
--all-sources
--name<pattern>

Described in Uses Report (CSV).

wiki

Looks up the dl:wiki concept topics a team has written into their own doc comments, and routes a human phrase to the code that implements it.

drag-lint wiki --term "<phrase>" | --list | --check [--json] [--db <file.sqlite>] (dl:wiki CONCEPT topics written in doc comments: --term routes a human word or alias ("the scheduler") to the owning symbol, --list prints every topic, --check resolves every SeeCode entry and exits 1 on drift. Authoring format: docs\wiki\Wiki-Blocks-Authoring.md)
FlagArgumentMeaningDefault
--term
--list
--check
--json
--db<file.sqlite>

Described in:

wiring

Surfaces bindings the compiler does not make obvious: Spring4D container registrations and DFM event hookups for a type.

drag-lint wiring --qname <IIntf|TForm> [--db <file.sqlite>] [--format text|json] (Spring4D DI + DFM event edges)
FlagArgumentMeaningDefault
--qname<IIntf|TForm>
--db<file.sqlite>
--format

Described in Show Wiring (Spring4D DI + DFM events).

workspace

Registers a project file into a .drag-lint-workspace.json workspace config, so multi-project workspace commands know about it.

drag-lint workspace index [--config <.drag-lint-workspace.json>]
drag-lint workspace add <projfile> [--config <.drag-lint-workspace.json>]
drag-lint workspace status [--config <.drag-lint-workspace.json>]
FlagArgumentMeaningDefault
--config<.drag-lint-workspace.json>

Described in: