Skip to content
Alexander Liberov edited this page Oct 21, 2026 · 9 revisions

drag-lint

An AST-exact index, linter and documentation engine for Delphi / Object Pascal.

drag-lint parses your source with tree-sitter, stores symbols, references and call edges in SQLite, and answers questions about them: where is this declared, who calls it, what breaks if I change it, what is undocumented, what is wrong with it. It ships as a command-line tool, a RAD Studio IDE plugin, and a language server.

The one-paragraph model

Everything drag-lint knows lives in a SQLite index. One index per project, stored beside the project file at <project folder>\_D-RAG\<projectname>.sqlite, plus one per-platform library index covering the RTL, VCL and third-party units. A manifest (drag-lint.json, beside the exe) lists the sections and lets every command find the right database without being told. If an answer looks wrong, the first question is almost always is the index fresh? -- see Maintenance.

Two commands that answer most questions

drag-lint query --name TMyClass --db <index>
drag-lint query find-callers --name DoStuff --db <index>

and one that finds problems:

drag-lint lint-all --db <index>

A trap worth knowing on day one

On Windows, if NoDefaultCurrentDirectoryInExePath is set (it is, in many corporate images), then

cd C:\tools\drag-lint
drag-lint lint-all --db ...        <-- may run a DIFFERENT drag-lint.exe from PATH

does not run the exe in that folder. Always use .\drag-lint.exe or a full path. This is not hypothetical: it once produced 33,626 findings against the real 14,764, silently, because an old binary answered.

Status: alpha (current release v1.33.0-alpha; extractor 1.22.0-alpha, resolver 1.12.1-alpha, index schema 23). Expect breaking changes. The index format is stable within a schema version; the CLI surface is not yet frozen.

Start here

Page For
Features Everything it does, grouped
Feature Index Every feature by the surface it is reached from
Quick Help One line per feature, with the short help and the aliases people search for
Installation Getting the CLI, the IDE plugin, or the LSP running
Maintenance Indexes, the manifest, reindexing, and what to do when something looks wrong
IDE Menu Reference What every item in the drag-lint menu does
Chart questions Every chart question of the Reports submenu and drag-lint ask, imported from REPORT_QUESTIONS
Charts and the IDE Ask a chart question, open the answer, read a round-trip trace, jump to RAD Studio
Field round-trip (grid -> server -> SQL) Field round-trip (grid -> server -> SQL) -- chart question (Field, property or grid column at the cursor)
About and Status The plugin's status window -- versions, connection health, and which indexes are actually in use

Related projects

  • drag-lint-graph -- The interactive graph viewer (drag_lint_graph.exe), dockable in the IDE; a separate repository, linked here, not registered.
  • YADF -- The Delphi formatter drag-lint drives from the IDE menu (Format with YADF); a separate repository, linked here, not registered.

Links

Generated by featuregen build --all from features\; do not edit by hand.

Clone this wiki locally