Delphi-RAG-Lint

drag-lint help

Document it

Since: 0.90.0-alpha

Generates or repairs a managed DocInsight comment on the single symbol represented by a Structure-tree node.

Read this when one declaration needs a doc comment and you do not want to touch the rest of the unit. Right-click the symbol in the Structure form and choose Document it to generate or repair its managed DocInsight comment.

How to run it

Full flag list: document in the CLI reference.

Flags

FlagArgumentMeaningDefault
--qname<Foo.TBar.Baz>
--apply
--json
--no-backup
--migrate-pure
--dbPATH

Where to click

  • Right-click in the Structure form: Document it
    1. Open the Structure form (drag-lint > Show Structure)
    2. Right-click the symbol node
    3. Choose Document it; its managed DocInsight comment is generated or repaired

Details

Generates or repairs a managed DocInsight comment on the single symbol represented by a Structure-tree node. Reach for it when one declaration needs a doc comment and you do not want to touch the rest of the unit.

Running it from the CLI

The feature map lists the underlying verb as document. From the usage banner, the single-symbol form:

drag-lint document --qname <Foo.TBar.Baz> [--apply|--json|--no-backup] [--db PATH]

Generates/repairs a managed DocInsight comment for that one qualified name.

On a property or field with resolved uses the managed block says where it is used, with the access mode: Used in: uCons.TConsumer.Go (uCons.pas) [rw]. That line replaces the name-matched Used by: (wave 147, on by default); with no resolved use the Used by: line is written as before. Since 1.52 a site that is the whole argument of Inc/Dec or of an out parameter counts as a write ([w]) and of a var parameter as both ([rw]), the same directions usages --rw lists.

Since wave 148 the line also lists uses that only another project's index records (document --db A --db B: the extra --db is asked by the full qualified name), and a getter or setter keeps Called from: and gains Used in (via property Value): uCons.TConsumer.Go (uCons.pas) [r] -- the property accesses that ran it. Expect a one-time rewrite: the first document --apply on a project rewrites every such block, and doc-drift reports them as a stale facts block until it has run.

What it needs

Optional, per the feature map's Index column.

Example

Illustrative:

drag-lint document --qname Unit1.TMyClass.DoWork --apply --db C:\Projects\MyApp\_D-RAG\MyApp.sqlite

This would write a managed DocInsight comment onto DoWork.


All features | CLI reference | IDE menus