Delphi-RAG-Lint

drag-lint help

drag-lint is developed alongside Micronite, our quality and production-control software (www.htrmicronite.com).

Indexing

Build and maintain the per-project and library indexes.

FeatureWhat it doesSince
Auto-Document Whole ProjectWrites DocInsight documentation into every public declaration a project owns0.1.0-alpha
migrate-dbsMoves project index databases into each project's own D-RAG folder, matching the current index layout1.3.0-alpha
pp-profileDiagnostic that prints the resolved preprocessor define profile for a project, one symbol per line0.92.0-alpha
purge-localsA size escape hatch for an index database that has grown too large: it drops local-variable and parameter symbols and runs VACUUM to reclaim space0.91.0-alpha
Rebuild Index for This ProjectWalks a project's .dproj compile closure and (re)builds its index0.1.0-alpha
register-projectAdd a new project to the manifest so index --all and the IDE can see it1.20.4-alpha
schemaPrints the live schema of an index database: schemaversion, every table and column, and row counts0.3.0-alpha
Show Resolved DBs (debug)Prints which database(s) drag-lint would actually use for a given project, file, or platform, without running a real query0.60.0-alpha

Search and navigation

Find symbols, callers, callees, text and types in the index.

FeatureWhat it doesSince
call-pathFinds the shortest resolved call path from one symbol to another0.91.0-alpha
Class SurfaceShows the public surface of a class: its members and signatures, without the method bodies0.1.0-alpha
Compiler HintsUses query hints to surface compiler hint/warning findings that have been imported into the index, filtered by code or severity0.1.0-alpha
contextReturns a compact context bundle for a symbol -- its doc comment, class surface (signatures), the target's own body, and a capped list of callers0.6.0-alpha
find-calleesLists the resolved outgoing calls of one routine0.91.0-alpha
Find Undocumented (public)Uses query find to list indexed symbols filtered by documentation state, kind, or visibility0.1.0-alpha
find-unitFinds which indexed unit declares a symbol, and adds that unit to a file's uses clause0.69.0-alpha
Find UsagesLists every reference to the symbol under the editor caret across the indexed project0.33.0-alpha
Find UsagesLists references to the symbol represented by a Structure-tree node0.33.0-alpha
Go to DeclarationJumps the editor caret to the declaration of the symbol represented by a Structure-tree node0.0.0
Go to DefinitionJumps the editor caret to the declaration of the symbol under the cursor0.0.0
Go to ImplementationJumps the editor caret to the implementation of the symbol represented by a Structure-tree node0.43.0-alpha
helpers-ofLists record/class helper edges targeting a given type, anywhere in the index0.94.0-alpha
Hover at CursorShows a hover card for the symbol under the editor caret: signature, documentation, and callers0.7.0-alpha
outlinePrints the file-scoped symbol outline for one Pascal unit0.86.0-alpha
query ancestorsResolves the transitive class/interface hierarchy of a type0.1.0-alpha
query descendantsThe reverse of query ancestors: lists every class that descends from a given ancestor, across all scanned databases0.1.0-alpha
query find-callersLists callers of a routine by name, with an option to restrict results to precise, resolved callers0.1.0-alpha
query --kind --allLists every symbol of one kind -- every unit, every class, every enum -- with no name, no doc clause and no row cap0.1.0-alpha
query --name-likeCase-insensitive substring search over symbol names0.1.0-alpha
query type-usageAnswers one question, of a list of type names, about one file0.1.0-alpha
query typecatResolves a type's category -- float, string, class, interface, and so on0.1.0-alpha
query unit-usageAnswers one question, about one unit and one file0.1.0-alpha
Show CompletionShows an index-backed completion list at the editor caret0.21.0-alpha
Show Signature HelpShows parameter help for the call being typed at the editor caret0.21.0-alpha
Show StructureShows a structural outline of the current unit0.30.0-alpha
Symbol SearchSearches symbols by name across the indexed projects0.1.0-alpha
Symbol SliceShows the slice of code relevant to one symbol: its declaration, body, and immediate context0.17.0-alpha
Type at CursorResolves the static type of the expression under the editor caret0.19.0-alpha
usagesFinds usage sites of a named symbol, with a choice of report width0.33.0-alpha
wikiLooks 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 it1.7.0-alpha

Linting

Rules, autofix, suppression markers and project-wide checks.

FeatureWhat it doesSince
Copy All DiagnosticsPuts every lint finding for the current unit onto the clipboard, starting from the Structure form0.1.0-alpha
Copy Diagnostics (Current File)Puts the current file's lint findings onto the clipboard0.1.0-alpha
Copy Selected DiagnosticsCopies only the Diagnostics rows selected in the Structure form (Ctrl/Shift-click, Ctrl+C) to the clipboard1.28.3-alpha
drag-lint: Project RulesShows the catalog of lint rules in the context of a specific project0.2.0-alpha
exceptions-syncDeclare one exception class per distinct raise Exception.Create message, then rewrite the raise sites1.8.0-alpha
Fix all in projectApplies autofixes for every fixable finding across the whole project, starting from the Structure form0.61.0-alpha
Fix all in unitApplies autofixes for every fixable finding in the current unit, starting from the Structure form0.1.0-alpha
Fix all reliability (1.31.3)Fix all no longer drops every rename for library-root members, shows a wait cursor and refuses a second fix, and keeps E-prefixed exception classes1.31.3-alpha
Fix itApplies the fix for the single lint finding on a Structure-tree node; an unused unit is removed or moved to implementation by compiling0.1.0-alpha
Format Whole Project with YADFRuns YADF formatting across a project's files, with indexing involved as part of the same action0.1.0-alpha
Format with YADFReformats one Pascal unit by driving the external YADF formatter0.16.0-alpha
Lint Buffer (Unsaved)Lints the current editor buffer's in-memory content, including unsaved edits, without writing it to disk first0.1.0-alpha
lint-projectRuns project-scoped structural lint rules against an index -- checks such as god-class, unused-public-symbol0.48.0-alpha
Lint rulesEvery lint rule the engine ships, imported from rules --json0.2.0-alpha
lint-treeAnswers one question lint-all cannot: does an interface edit to this unit reach any dependent?1.11.0-alpha
Rename across every project that compiles a shared unitA naming fix on a unit several project indexes own renames it in every owner or in none, after an IDE confirmation listing the projects1.29.0-alpha
Rescan this unitRe-indexes the active project and re-lints the current unit on demand, so the Diagnostics panel drops findings already fixed1.28.3-alpha
Run AST ChecksRuns drag-lint's AST-level checks against a file0.31.0-alpha
Run Diagnostics (didSave)Runs drag-lint's diagnostics pass on a file automatically when it is saved, mirroring the LSP textDocument/didSave notification0.0.0
Run Lint All (Full Report)Runs the whole rule catalog against a project's indexed code and reports every surviving finding -- the overall project health check0.61.0-alpha
type-name-prefix: expected letter from the ancestor chaintype-name-prefix picks E or T from the ancestor chain (project, then library index); untraceable ancestors are an index gap; autofix uses the finding's letter1.31.4-alpha

Documentation

DocInsight comments generated from the index, and drift detection.

FeatureWhat it doesSince
Doc Comment Stub (symbol)Uses generate-docs to produce a doc-comment stub for one qualified symbol0.25.0-alpha
doc-driftDiagnostic that computes deterministic doc-vs-code drift findings for one symbol0.93.0-alpha
doc-forgetReap or rename the project tags on inbound documentation facts; a dry run unless told to apply1.17.0-alpha
document-allDocuments every public declaration in every indexed unit, with no project scope0.93.0-alpha
Document itGenerates or repairs a managed DocInsight comment on the single symbol represented by a Structure-tree node0.90.0-alpha
Document projectGenerates or repairs managed DocInsight comments for every public declaration the project owns, starting from a Structure-tree node's project0.90.0-alpha
Document unitGenerates or repairs managed DocInsight comments for every public declaration in the unit represented by a Structure-tree node (facts-only)0.90.0-alpha
Effect Summary LegendThe purity analysis writes a short token string for every routine it judges -- symbolfacts.effectsummary in the index0.0.0
shared-unitReads or extends the dl:shared marker on a unit, recording which projects share it1.10.0-alpha
dl:wiki concept blocksThe format of a dl:wiki block -- the concept notes the wiki verb reads1.7.0-alpha

Refactoring and code generation

Rename, extract, safe delete, uses cleanup and code stubs.

FeatureWhat it doesSince
allowRecords a dl:ok review of one finding, so it stops being reported without being fixed0.54.0-alpha
Allow this messageRecords a dl:ok review of one finding, so it stops being reported without being fixed0.54.0-alpha
create-enum-helperGenerates a Byte-family record helper (ToByte/FromByte/ToInteger/ FromInteger/ToString/FromString) for an enum type0.94.0-alpha
Create helper classGenerates a Byte-family record helper for an enum type represented by a Structure-tree node0.94.0-alpha
extract-methodPulls a run of statements out of a routine into a new method0.85.0-alpha
Quick-Fix: Add Unit for Inline Hint (H2443) at CursorThe same idea as the undeclared-identifier quick-fix, but for compiler hint H2443 -- an inline routine whose declaring unit is not in scope0.0.0
Quick-Fix: Add Unit for Undeclared at Cursor (Ctrl+Alt+U)Finds which unit declares the identifier under the caret and adds that unit to the current unit's uses clause0.0.0
Quick-Fix: Convert Public Field to Property at CursorRewrites a public field under the caret as a property0.0.0
Reconcile Project Members (.dpr/.dproj)Compares a project file's declared member list against what is on disk and in the compile closure1.18.0-alpha
Rename SymbolRenames a symbol across the whole indexed project0.24.0-alpha
safe-deleteDeletes a symbol if and only if it has zero references in the index0.69.0-alpha
Unit Test Stub (symbol)Uses generate-test to produce a unit-test skeleton for one qualified symbol0.27.0-alpha
Uses Audit -- interface->impl moves + unused (this unit)For one unit, reports which uses entries could move from the interface section to implementation, and which are unused entirely0.43.0-alpha
Uses Cleanup Preview (compiler-verified, this unit)The removals a Uses Audit suggests, but verified by actually compiling0.43.0-alpha
Uses & Deps TabOpen the Uses & Deps tab to review uses-clause fixes and apply them0.0.0

Component conversion

Rule-driven migration of legacy component types.

FeatureWhat it doesSince
convert-applyLocates .dfm component instances that match a #convert rule from a conversion-rules file and rewrites all five surfaces: declaration retype, uses-add1.2.0-alpha
convert-apply #migrate (member rename / DL_NONE)#migrate Old -> New / Old -> DL_NONE inside a #convert block renames or deliberately breaks a member at every bound .pas access site1.22.0-alpha
convert-scaffoldAuto-generates a valid conversion-rules file from the real property trees of a from-type and a to-type1.1.0-alpha
convert-validateParses and validates a conversion-rules file (a reFind-superset DSL), checking its #link/#default paths against the real property trees1.1.0-alpha
Convert progressConvRulesEditor Convert tab: per-step progress (unit, book, phase, elapsed) on the status bar and the tab1.26.7-alpha
ConvRulesEditorVisual rulebook editor for the conversion rules; its Convert tab reports StripDB value casts, cast sites to convert by hand and uses changes (engine 1.27)0.0.0
Qualify #convert quick fixConvRulesEditor Convert tab: one click writes the engine's qualified #convert line (apply/1 qualify_fixes) into the open book1.31.5-alpha
Reindex projectConvRulesEditor command: incremental index --project of the editor's project index, cancellable1.26.7-alpha
Work listConvRulesEditor tab: what the last Convert run's converted code still uses from the old components (engine pas_uses)1.28.2-alpha
glyph-vacuumMeasure every streamed glyph or picture under a tree before writing a glyph rule1.15.0-alpha
proptreeRecursive deep-property enumerator for a class: flattens its own and inherited properties into dotted paths, recursing into class-typed properties1.1.0-alpha

Graphs and reports

Call graphs, dependency reports, dead code, tester spreadsheets.

FeatureWhat it doesSince
butterflyComposes a symbol's callers (upward wing) and callees (downward wing) into one combined chart in a single command0.99.0-alpha
Call Graph (Butterfly)Shows callers and callees of one symbol together in a single "butterfly" view0.96.0-alpha
callgraphPrints an N-deep resolved call tree for a symbol, in either direction0.91.0-alpha
Circular Dependency Report (worked example)A worked example: a real four-unit uses cycle, and the report drag-lint produces for it0.0.0
Circular Uses Report (cycles + fix plan)Finds uses cycles among indexed units and, on request, proposes a followable refactoring plan to break them0.43.0-alpha
Cycles fix (mechanical, compile-gated)Plans, compile-gates and (with --apply) writes the mechanical fix of one circular uses group, verified against the predicted cycles output1.33.0-alpha
deps-reportProduces a third-party dependency rollup from an index: which external units/libraries an indexed codebase depends on0.95.0-alpha
Export Enums (Delphi const)Uses export enums with --format delphi-const to dump indexed enum types as Delphi const declarations0.6.0-alpha
Export Graph (DOT)Uses graph to export the indexed call/reference graph in DOT format, either whole or rooted at a name substring0.6.0-alpha
Export to ObsidianUses export obsidian to write the indexed project out as a set of Obsidian vault markdown pages0.6.0-alpha
Find Dead CodeScans the index for code with no references -- candidates to delete0.25.0-alpha
Forms for testers (CSV)A CSV of a project's forms, one row per form, telling a tester how to reach each one from the main form0.44.0-alpha
Impact / Blast Radius (symbol)Reports what would be affected if a chosen symbol changes -- the set of code to retest0.17.0-alpha
Reverse Call Tree (clickable, Messages window)The same reverse call tree, rendered into the IDE's Messages window so each line navigates to the caller0.96.0-alpha
Reverse Call Tree (who calls this, N-deep)Builds the tree of callers of a chosen symbol, transitively, to a chosen depth0.96.0-alpha
Scan TODOs / FIXMEsScans source for TODO/FIXME/HACK/XXX/REVIEW/NOTE markers0.12.0-alpha
Show in Call GraphOpens the call graph rooted at the symbol represented by a Structure-tree node0.96.0-alpha
Show Wiring (Spring4D DI + DFM events)Surfaces bindings the compiler does not make obvious: Spring4D container registrations and DFM event hookups for a type0.21.0-alpha
Top Symbols (fan-in)Ranks indexed symbols by fan-in -- how many places reference them0.6.0-alpha
Uses Report (CSV)Exports the project's unit-dependency data as a CSV file0.40.5-alpha

Diagrams and charts

Ask a question about a symbol and get a clickable chart.

FeatureWhat it doesSince
askAsk one report question and print the answer as text1.30.0-alpha
Where the charts find GraphvizThe charts find dot.exe by DRAGLINT_DOT, settings.json, the installed layout, PATH, then the shared default1.26.1-alpha
Chart questionsEvery chart question of the Reports submenu and drag-lint ask, imported from REPORT_QUESTIONS1.20.2-alpha
Charts and the IDEAsk a chart question, open the answer, read a round-trip trace, jump to RAD Studio1.20.1-alpha
Compare a report with current codeReruns a saved or pasted report and shows before / delta / after1.28.0-alpha
Click-to-source: the draglint:// handlerRegisters draglint:// so a chart row opens its line in RAD Studio; a GUI helper exe, no PowerShell1.31.0-alpha

Compiler integration

Compile, fold compiler output into findings, preprocess.

FeatureWhat it doesSince
Add Missing Units to uses (whole 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 them0.43.0-alpha
Compile Buffer (unsaved)Compiles a project with the current editor buffer's unsaved content substituted for its file on disk, then restores the original file unchanged0.0.0
compile-checkRuns a compiler-backed check against a single Delphi project (.dproj) or source file (.pas) and reports the result0.26.0-alpha
Compile DependentsCheck the units that depend on the one being edited now, instead of waiting for the automatic quiet-period pass (lint-tree tier 3)0.0.0
Compile & DiagnoseCompiles a project or unit and folds the compiler's errors and warnings into drag-lint findings0.0.0
Full Compile SweepRecompiles a project's stale units and refreshes its stored compiler findings, forcing a full build rather than the default stale-count threshold1.2.0-alpha
ghost-checkCompiles a project with one or more units' content temporarily replaced by their unsaved editor buffers, then restores the original files unchanged1.8.0-alpha
ghost-recoverScans a project's hidden D-RAG folder for recovery journals left behind when a ghost-check overlay was interrupted by a crash0.64.1-alpha
Import Build LogParses an external dcc or msbuild build log and folds its errors and warnings into drag-lint's stored findings0.8.0-alpha
preprocess-fileDiagnostic that prints a file's {$IFDEF}-resolved source to stdout under a given define set0.92.0-alpha
project-factsReport what the build does: defines that are on and what sets each, imports, output paths and packages1.20.0-alpha
Recover Buffer-Compile FilesRestores any file left holding unsaved-buffer content after a Compile Buffer (unsaved) run was interrupted (for example by a crash)0.0.0

Database and Firebird

SQL scripts, live schema snapshots, ORM links.

FeatureWhat it doesSince
fb-snapshotConnects to a Firebird database and captures a snapshot into a sqlite index0.40.5-alpha
link-ormLinks a project's code index to a SQL index so ORM-style relationships between Delphi symbols and SQL objects can be resolved across both0.40.5-alpha

Editor integration

The RAD Studio plugin, the language server, MCP and workspaces.

FeatureWhat it doesSince
drag-lintThis page documents the "View > Tool Windows > drag-lint" menu entry -- the main drag-lint dockable tool window0.2.0-alpha
drag-lint GraphThis page documents the "View > Tool Windows > drag-lint Graph" menu entry -- the drag-lint graph viewer0.10.0-alpha
drag-lint Graph (dockable)Opens the drag-lint graph viewer as a dockable window inside the IDE, so it can sit beside Structure0.0.0
drag-lint OptionsThe plugin's settings dialog for drag-lint: lets you browse and toggle the lint rule catalog0.95.0-alpha
drag-lint Panel (dockable)Opens the main drag-lint dockable tool window inside the IDE0.0.0
IDE Menu ReferenceWhat every item in the drag-lint menu does0.0.0
ide-releaseAsks 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 request1.13.0-alpha
InstallationGetting the CLI, the IDE plugin, or the LSP running0.21.0-alpha
lspStarts the LSP (Language Server Protocol) stdio server0.6.0-alpha
Register the MCP server (Claude Code, VS Code)Adds drag-lint serve to Claude Code and VS Code MCP config: merged, backed up, idempotent, removable1.26.1-alpha
MCP serverExposes the index to MCP clients as 15 tools0.4.0-alpha
serveStarts the MCP (Model Context Protocol) stdio server, for AI clients such as Claude or Cursor to query a drag-lint index0.4.0-alpha
Setup installerOne Inno Setup installer for the engine, Graphviz dot, the IDE plugin, ConvRulesEditor, drag-lint-graph and YADF1.28.3-alpha
workspace addRegisters a project file into a .drag-lint-workspace.json workspace config, so multi-project workspace commands know about it0.6.0-alpha
workspace indexIndexes every project registered in a .drag-lint-workspace.json workspace config in one pass0.6.0-alpha
workspace statusReports the status of every project registered in a .drag-lint-workspace.json workspace config0.6.0-alpha

Maintenance and diagnostics

Which databases cover what, drift checks, raw dumps, self-tests.

FeatureWhat it doesSince
About and StatusThe plugin's status window -- versions, connection health, and which indexes are actually in use0.15.0-alpha
ambiguous-callsResolver-coverage diagnostic that reports call sites the engine could not pin to exactly one target -- unresolved or ambiguous calls0.91.0-alpha
bench-contextBenchmarks the context command by building context bundles for a sample of symbols against a database0.18.0-alpha
diffCompares two index databases and reports what changed between them -- for example an index snapshot taken before and after a refactor0.13.0-alpha
dump-call-edgesDiagnostic that dumps every resolved call edge in the index as refid|targetqname|confidence rows0.91.0-alpha
dump-refsDiagnostic that dumps every ref in a file together with its enclosingsymbolid attribution0.82.0-alpha
Feature registryThe machine-checked master list of every feature, and the generator of the index pages1.22.0-alpha
infoPrints engine self-info: version, build date, license (MIT), tree-sitter details, and capabilities0.19.0-alpha
Library Drift CheckFlags registered library roots that have source on disk but nothing in the index0.0.0
MaintenanceIndexes, the manifest, reindexing, and what to do when something looks wrong0.0.0
Open Plugin LogOpens the drag-lint plugin's own log file0.39.0-alpha
shutdownAsk running lsp engines to close their indexes and stand down, so an index can be rebuilt without killing them0.6.0-alpha
sqlRuns one read-only SQL statement against an index database and prints the result set0.40.5-alpha