Delphi-RAG-Lint

drag-lint help

Live routine metrics (Structure form)

Since: 1.57.0-alpha

Shows the length and cyclomatic complexity of the routine under the caret, from the index.

Read this when you want to see how long and how branchy the routine you are editing is without running a report. The line under the Structure form tree names the routine the caret is in, its body lines and its cyclomatic complexity, read from the project index (metrics --level routine).

How to run it

drag-lint metrics --db <db> [--level routine,class,unit,folder|all] [--in <path prefix>] [--top <n>] [--save] [--trend] [--halstead] [--json]

Example:

drag-lint metrics --db <db> --level routine --in <file> --top 0 --json

Full flag list: metrics in the CLI reference.

Where to click

  • RAD Studio main menu: drag-lint > Show Structure
    1. Open the Structure form (drag-lint > Show Structure)
    2. Put the caret inside a routine of an indexed unit
    3. The line under the tree reads <routine>: <N> lines, cyclomatic <C>

Details

Shows the length and the cyclomatic complexity of the routine under the caret, read from the project index. Reach for it when you want to know how long and how branchy the routine you are editing is, without running a report.

Where the numbers come from

The metrics verb's routine rows (symbol_facts.body_loc and symbol_facts.cyclomatic), one engine run per file and index state:

drag-lint metrics --db <db> --level routine --in <file> --top 0 --json

A caret move inside a file already read runs nothing. After a reindex the next caret move reads the file again.

Limits

  • The numbers are those of the last index of the file, not of the editor buffer: unsaved and unindexed edits are not counted until the project is reindexed.
  • The first caret move in a file shows nothing until the engine answers.

All features | CLI reference | IDE menus